相关文章推荐
烦恼的核桃  ·  java ...·  1 月前    · 
深沉的山羊  ·  404 - 知乎·  8 月前    · 
坚强的四季豆  ·  python ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I am getting following error. Can't figure out solution. I found many post which looks duplicate here but, nothing work.

like: Requires Babel "7.0.0-0" but was loaded with "6.26.3"

node_modules@babel\helper-plugin-utils\lib\index.js

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.

Here following is my package.json

"dependencies": {
    "express": "^4.16.4",
    "isomorphic-fetch": "^2.2.1",
    "react": "^16.6.3",
    "react-dom": "^16.6.3",
    "react-redux": "^5.1.1",
    "react-router": "^4.3.1",
    "react-router-config": "^1.0.0-beta.4",
    "react-router-dom": "^4.3.1",
    "redux": "^4.0.1",
    "redux-thunk": "^2.3.0"
  "devDependencies": {
    "@babel/cli": "^7.2.3",
    "@babel/core": "^7.2.2",
    "@babel/plugin-proposal-class-properties": "^7.2.0",
    "@babel/plugin-transform-runtime": "^7.2.0",
    "@babel/preset-env": "^7.3.1",
    "@babel/preset-react": "^7.0.0",
    "babel-core": "^7.0.0-bridge.0",
    "babel-jest": "^24.0.0",
    "babel-loader": "^7.1.5",
    "css-loader": "^1.0.1",
    "cypress": "^3.1.3",
    "enzyme": "^3.8.0",
    "enzyme-adapter-react-16": "^1.7.1",
    "enzyme-to-json": "^3.3.5",
    "extract-text-webpack-plugin": "^4.0.0-beta.0",
    "html-webpack-plugin": "^3.2.0",
    "jest": "^24.0.0",
    "jest-fetch-mock": "^2.0.1",
    "json-loader": "^0.5.7",
    "nodemon": "^1.18.9",
    "npm-run-all": "^4.1.5",
    "open": "0.0.5",
    "redux-devtools": "^3.4.2",
    "redux-mock-store": "^1.5.3",
    "regenerator-runtime": "^0.13.1",
    "style-loader": "^0.23.1",
    "uglifyjs-webpack-plugin": "^2.0.1",
    "webpack": "^4.26.1",
    "webpack-cli": "^3.1.2",
    "webpack-dev-server": "^3.1.14",
    "webpack-node-externals": "^1.7.2"
  "babel": {
    "presets": [
      "@babel/preset-env",
      "@babel/preset-react"
    "plugins": [
      "@babel/plugin-transform-runtime",
      "@babel/plugin-proposal-class-properties"

I am getting on npm start.

"start": "webpack -d && nodemon --exec babel-node ./server"
                How did you get that error? On npm install on npm update...? Are you using npm? are you using yarn? do you have a lock file? In other words: could you please describe your build process? Thanks!
– Josep
                Jan 28, 2019 at 11:13
                Please try this: first make sure that you have committed your latest changes on git, just in case, then go ahead and do this: rm -rf node_modules && rm package-lock.json && npm install... Do you get any warnings in the console? could you please share them? It's also possible that things start working after performing those steps :-)
– Josep
                Jan 28, 2019 at 11:18
                @Freestyle09 yeah. i was working with 6 already but, after using react-loadable it asked me to use version 7
– ketan
                Jan 28, 2019 at 11:41

Found it :-)

I noticed that babel-node is not among your dependencies, therefore you must be using a global version of babel-node, likely version 6... So, just add the correct one into your devDependencies:

npm install --save-dev @babel/node 
                I did this, and then it said it needed a NODE_ENV value. I provided one, and then I was back to the same error!
– Jonathan Tuzman
                Sep 1, 2021 at 19:12

What is the output of npm ls babel-core? I realised that I have babel-cli@6.26.0 and babel-register@6.26.0, I removed them and installed @babel/cli and @babel/register

My config files look like this: In package.json:

  "resolutions": {
      "babel-core": "7.0.0-bridge.0"

In .babelrc :

"presets": [ "@babel/preset-env", "@babel/preset-react" "plugins": [ "@babel/plugin-transform-runtime", "@babel/plugin-proposal-class-properties", "@babel/plugin-proposal-object-rest-spread", "@babel/plugin-transform-async-to-generator"

After all changes, it might be a good idea to delete your lock file and rebuild it.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.