Meteor: [1.4.2-beta.5+] Cannot find module when babel-runtime listed in devDependencies

Created on 5 Oct 2016  路  3Comments  路  Source: meteor/meteor

As mentioned in the pull request #7668, the app crashed with Error: Cannot find module '../core-js/symbol/iterator'. Moving babel-runtime from devDependencies to dependencies fixed this.

The reason we have babel-runtime in our package.json is for other node tools we use (unit tests for small bits of code), and we tried to create the same runtime as meteor for them.

Repo with reproduction app:

https://github.com/eldog/meteor-dev-dependency-bug

some NPM has-workaround Bug confirmed

Most helpful comment

It will be added automatically in new projects, but for existing projects you should also add the --save flag to that command:

meteor npm install babel-runtime --save

This is noted in the changelog for 1.4.2.1.

All 3 comments

Thanks for taking the time to open this issue!

In case anyone else gets Error: Cannot find module '../core-js/symbol/iterator' after updating meteor to 1.4.2.1 or higher, you may need to meteor npm install babel-runtime --save.

Edit: Changed my comment to apply some of the smart stuff @abernix is saying below.

It will be added automatically in new projects, but for existing projects you should also add the --save flag to that command:

meteor npm install babel-runtime --save

This is noted in the changelog for 1.4.2.1.

Was this page helpful?
0 / 5 - 0 ratings