@babel error with upgrading to 2.3.4

I’m getting the below error when trying to run my project that is newly update to 2.3.4 and installing the babel package it says to doesn’t change anything.

Error:
W20210817-20:42:35.611(-5)? (STDERR) The @babel/runtime npm package could not be found in your node_modules
W20210817-20:42:35.611(-5)? (STDERR) directory. Please run the following command to install it:
W20210817-20:42:35.611(-5)? (STDERR)
W20210817-20:42:35.612(-5)? (STDERR) meteor npm install --save @babel/runtime
W20210817-20:42:35.612(-5)? (STDERR)
W20210817-20:42:35.612(-5)? (STDERR) at module (packages\babel-runtime.js:20:9)
W20210817-20:42:35.613(-5)? (STDERR) at fileEvaluate (packages\modules-runtime.js:336:7)
W20210817-20:42:35.613(-5)? (STDERR) at Module.require (packages\modules-runtime.js:238:14)
W20210817-20:42:35.613(-5)? (STDERR) at require (packages\modules-runtime.js:258:21)
W20210817-20:42:35.613(-5)? (STDERR) at packages\babel-runtime.js:53:15
W20210817-20:42:35.614(-5)? (STDERR) at packages\babel-runtime.js:58:3
W20210817-20:42:35.614(-5)? (STDERR) at C:\Users\Dusty\Downloads\TryForSpecs.meteor\local\build\programs\server\boot.js:401:38
W20210817-20:42:35.614(-5)? (STDERR) at Array.forEach ()
W20210817-20:42:35.615(-5)? (STDERR) at C:\Users\Dusty\Downloads\TryForSpecs.meteor\local\build\programs\server\boot.js:226:21
W20210817-20:42:35.615(-5)? (STDERR) at C:\Users\Dusty\Downloads\TryForSpecs.meteor\local\build\programs\server\boot.js:464:7
=> Exited with code: 1

I often got such errors with some libraries, most of the time after executing “test-packages”. My workaround is this:

rm -fr node_modules/jquery && rm -fr node_modules/@babel && rm -fr node_modules/meteor-node-stubs && meteor npm install --save @babel/runtime && meteor npm install --save meteor-node-stubs && meteor npm i

Also I never had problems, with switching to the newest versions of babel, only benefits.

I did dig into this ~2 years ago, and AFAIR the reason was a tiny version-mismatch inside ./node_modules/@babel//node_modules/ . I guess, with the lived inaccuracy in the npm-world, you have to live with such discrepancies… :wink:

1 Like