Skip to content

Cannot find module #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
asselstine opened this issue Mar 28, 2018 · 2 comments
Closed

Cannot find module #17

asselstine opened this issue Mar 28, 2018 · 2 comments

Comments

@asselstine
Copy link

I followed the tutorial exactly:

  1. yarn add netlify-lambda in a new directory
  2. create a file called 'netlify.toml' with the contents
[build]
  functions = "functions"
  1. created the file src/hello.js with the contents:
exports.handler = function(event, context, callback) {
    callback(null, {
    statusCode: 200,
    body: "Hello, World"
    });
}
  1. Ran netlify-lambda serve src and got:
Unhandled rejection Error: Cannot find module '<redacted>/functions/hello'

Am I missing something here?

@asselstine
Copy link
Author

FYI babel-core was installed, but it was the wrong version. I had to install babel-core separately:

yarn add @babel/core@^7.0.0

@nolessafool
Copy link
Contributor

I think this was probably caused by #20

Takazudo added a commit to Takazudo/netlify-funcitons-misc that referenced this issue Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants