BuildError: Requires Babel X, but was loaded with Y

My meteor application stopped compiling, overnight. The only thing I’ve changed was reinstalling my node_modules, no updates or anything like that.

Does someone have an idea how to fix the error:
Requires Babel "^7.0.0-beta.41", but was loaded with "7.0.0-beta.38"? I’ve tried upgrading @babel/core in package.json to beta.41 as well as beta.42, but without any luck.

I’ve also tried upgrading ecmascript and babel-compiler, but that also didn’t seem to help.

   => Errors prevented startup:

 While processing files with ecmascript (for target web.browser):
   c:\src\node_modules\@babel\helper-plugin-utils\lib\index.js:60:11: [BABEL] imports/lib/config.js: Requires Babel "^7.0.0-beta.41", but was loaded with "7.0.0-beta.38". You'll need to update your @babel/core
   version. (While processing: "base$1")
   at throwVersionError (c:\src\node_modules\@babel\helper-plugin-utils\lib\index.js:60:11)
   at Object.assertVersion (c:\src\node_modules\@babel\helper-plugin-utils\lib\index.js:11:11)
   at c:\src\node_modules\@babel\preset-react\lib\index.js:21:7
   at c:\src\node_modules\@babel\helper-plugin-utils\lib\index.js:16:12
2 Likes

When I upgrade ecmascript to 0.10.5 (from 0.10.0), the error changes to

Requires Babel "^7.0.0-beta.41", but was loaded with "7.0.0-beta.40". You'll need to update your @babel/core

So I guess I need a newer ecmascript package? @benjamn I see there is no beta.41 version of meteor-babel. Can this be a problem? I see the create-react-app has a similar issue to the one I’m experiencing here, and they have a fix open by upgrading all babel packages to .41.

https://github.com/facebook/create-react-app/issues/4154

1 Like

The problem disappeared upon removal of nathantreid:typescript-babel as reported here: https://github.com/nathantreid/meteor-typescript-babel/issues/6

Still don’t understand why it suddenly stopped working, without any change from my side. But at least I can start building again :grin: :innocent:

I don’t have the package you mentioned, but still started seeing this issue. Meteor totally crippled!

1 Like

I randomly have started seeing this without making any changes to my deps. Very frustrated. I can’t seem to fix it.

1 Like

Running meteor update did the job for me. Also try running npm update