-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
Bug Report
Current Behavior
I've tried to move to Babel 7 on existing simple project.
When I've finished migration I've got the error:
throw Object.assign(err, {
^
Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3". 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 is calling Babel.
Babel config for transformation the app is in /config/babelLoaderConfig.js
Here is link for the repository
Environment
- Babel version(s): v7.0.0-beta.51
- Node/npm version: Node 10.4./npm 6
- OS: Windows 7
- Monorepo yes
- How you are using Babel:
loader
wilk, zedtux, BritishWerewolf, nathanchere, thenengah and 4 more
Metadata
Metadata
Assignees
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
babel-bot commentedon Jun 21, 2018
Hey @budarin! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.
xtuc commentedon Jun 21, 2018
I think that you're loading a plugin that uses Babel 6 which is not compatible with Babel 7.
budarin commentedon Jun 21, 2018
@xtuc
What is the solution?
Move back?
ajliv commentedon Jun 21, 2018
@budarin try installing babel-core@7.0.0-bridge.0 alongside @babel/core and then adding this to your package.json --
budarin commentedon Jun 21, 2018
@ajliv
I've tried but with the same error :(
loganfsmyth commentedon Jun 21, 2018
As mentioned in the error itself, the stack trace is the important part here to diagnose the issue. Please include that.
budarin commentedon Jun 21, 2018
Here is full log:
budarin commentedon Jun 21, 2018
Repo is changed (I have undo babel7 modifications to Babel 6), but you cold do checkout the head to reproduce the error
loganfsmyth commentedon Jun 21, 2018
Yeah, so you have
babel-register
which is Babel 6. It would be@babel/register
for Babel 7.budarin commentedon Jun 21, 2018
@loganfsmyth
I have not babel-register in package.json!
jsg2021 commentedon Jun 21, 2018
@budarin you have
babel-core
twice with different values. Try deleting the line:loganfsmyth commentedon Jun 21, 2018
@budarin Since you're using a
webpack.config.babel.js
file, Webpack loadsbabel-register
/@babel/register
automatically, but since you don't have it in you deps you're basically accidentally relying on npm to flatten your dependencies and you're getting one by chance.budarin commentedon Jun 21, 2018
@jsg2021
I have no
"babel-core": "^6.26.3",
- it's error while copy from commit log - not remove removed linebudarin commentedon Jun 21, 2018
@loganfsmyth
Should I manually install @babel/register to resolve the problem?
loganfsmyth commentedon Jun 21, 2018
Yep!
29 remaining items