-
-
Notifications
You must be signed in to change notification settings - Fork 121
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 module 'babel-core' #124
Comments
Install npm install --save-dev babel-core babel-preset-env UpdateAs of babel 7, install the dependency via the following command instead npm install --save-dev @babel/core @babel/preset-env |
The messaging from
which tries to convey this, but unless you're looking for it, it's pretty easy to miss. |
Thank you, this worked. The release notes say:
could you please make it a bit more explicit that something is required from the users? A note in the README would be nice as well. |
Thanks @abbassiddiqi,Thanks, but why I have to install this module by separated. |
The Setup page in the docs on babeljs.io doesn't mention this either:
|
Agreed, the setup page should be updated. @Duvan01 |
this not works for me. |
it works |
It wasn't working for me too, until I read the README. |
I keep getting an error on windows machine.
|
@AlexanderKozhevin When installing, you need to install that too: https://github.com/babel/gulp-babel/tree/v7-maintenance#install |
@loganfsmyth thanx! |
`babel-core` is now expected to be a peer dependency. babel/gulp-babel#124
I could fix it by this link |
npm i @babel/core |
Thanks you so much |
Babel 6:
Babel 7:
|
@abbassiddiqi thank you very much!it worked |
The current reasonml needs an example of how to do getInitialProps. tmepple posted the only known way of doing it in [this comment](#4202 (comment)). It is unlikely reasonml users are going to discover that comment or figure it out on their own so having it in an example is critical. Also, dependencies updated. After updating dependencies, I get this error: ``` ModuleBuildError: Module build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js): [1] Error: Cannot find module '@babel/core' [1] babel-loader@8 requires Babel 7.x (the package '@babel/core'). If you'd like to use Babel 6.x ('babel-core'), you should install 'babel-loader@7'. ``` Seems like @babel/core is required as peer dependency per [this comment](babel/gulp-babel#124 (comment)) so I added it. The way to do getInitialProps has changed in 7.0.2 canary so this also has a comment in the code about what change is required to get that working.
For anyone finding themselves down this rabbit hole, this comment is the exact opposite of reality. Babel 7 moved to the @babel namespace. |
For me the only working solution for Babel 7 was from Babel setup guide. Note the gulp-babel@next
|
Thought I'd add my own solution: delete I have this issue crop up from time to time. Deleting |
still getiing the same error., please help me out. i tried sharing my package.json |
Just go inside the babel-loader and change the require("babel-core")----to ----require("@BabelCore") |
After all,do this also .Just go inside the babel-loader and change the require("babel-core")----to ----require("@BabelCore") |
Only this ^ worked for me. |
Still not working. Thanks |
If you are using
|
Thanks @jdavis-software , this one work for me |
Then run |
I've just updated from 6.1.2 to 7.0.0 and I now get this error message:
The text was updated successfully, but these errors were encountered: