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

.babelrc - Requires Babel "^7.0.0-0", but was loaded with "6.25.0" error #912

Closed
kkarkos opened this issue Feb 5, 2019 · 3 comments
Closed
Labels

Comments

@kkarkos
Copy link

kkarkos commented Feb 5, 2019

Hi, I'm trying to install "https://github.com/airbnb/babel-plugin-inline-react-svg" and as per docs I'm using a root based .babelrc

{ "presets": [ "razzle/babel", // NEEDED "stage-0" ], "plugins": ["inline-react-svg"] }

I get the following error:
ERROR in ./src/client/index.js Module build failed (from ./node_modules/razzle/node_modules/babel-loader/lib/index.js): Error: Requires Babel "^7.0.0-0", but was loaded with "6.25.0". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what iscalling Babel. at throwVersionError (/Users/konrad/Documents/Projects/widget-interim-repo/node_modules/@babel/helper-plugin-utils/lib/index.js:65:11) at assertVersion (/Users/konrad/Documents/Projects/widget-interim-repo/node_modules/@babel/helper-plugin-utils/lib/index.js:13:11)

Does razzle/babel only work with version 6 as stated here? babel/babel#8688 (comment)

I'm using:

"@babel/core": "^7.2.2", "babel-core": "^7.0.0-bridge.0",

Also tried it without the bridge. Cleaned the "npm cache" and all other kind of suggestions for this error online.

Any idea? Thank you!

@mschipperheyn
Copy link
Contributor

I recommend using razzle@next, that one uses babel 7.

@kkarkos
Copy link
Author

kkarkos commented Feb 5, 2019

Thanks, I bumped to v3.0.0-alpha.2- now. With babel 7 "stage-0" got removed (https://babeljs.io/blog/2018/07/27/removing-babels-stage-presets). No errors with using

{ "presets": [ "razzle/babel", // NEEDED ] }

However, I can't use alpha in production.

@kkarkos
Copy link
Author

kkarkos commented Feb 6, 2019

This can be closed -> answer here: #881 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants