Skip to content
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

Cannot find @babel/core #20

Closed
nzakas opened this issue Apr 1, 2018 · 5 comments
Closed

Cannot find @babel/core #20

nzakas opened this issue Apr 1, 2018 · 5 comments

Comments

@nzakas
Copy link

nzakas commented Apr 1, 2018

I’ve been using netlify-lambda and it throws an error whenever I use “serve”.

Nicholas@Patriot MINGW64 ~
$ node -v
v8.10.0

Nicholas@Patriot MINGW64 ~
$ npm -v
5.6.0

The full error is:

ERROR in ./subscribe.js
Module build failed: Error: Cannot find module '@babel/core'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\Nicholas\projects\personal\emails.humanwhocodes.com\node_modules\babel-loader\lib\transform.js:1:75)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\Nicholas\projects\personal\emails.humanwhocodes.com\node_modules\babel-loader\lib\cache.js:24:17)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)

This happens right at startup when testing locally and no functions will work. The function in this example simply prints out “OK”.

Is there something missing in the package for netlify-lambda?

@nzakas
Copy link
Author

nzakas commented Apr 1, 2018

Note: I’m using latest. If I downgrade to 0.3.0, I don’t get this problem.

@biilmann
Copy link
Member

biilmann commented Apr 1, 2018

Which version did you get when installing first time around? I'm wondering if the 1.0.0-babel-7-beta accidentally made it to the main line instead of a beta tag

@ahmedelgabri
Copy link

@biilmann yes 1.0.0-babel-7-beta is the latest release on npm.

@nzakas
Copy link
Author

nzakas commented Apr 2, 2018

Yup, latest is 1.0.0-babel-7-beta, that’s what gets installed by default with npm install

https://www.npmjs.com/package/netlify-lambda

@fool fool mentioned this issue Apr 2, 2018
@Cethy
Copy link

Cethy commented Apr 6, 2018

FWIW, I put "@babel/core": "7.0.0-beta.42" in my package.json to have it working.

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

4 participants