Shopify / sprockets-commoner

Use Babel in Sprockets to compile JavaScript modules for the browser
MIT License
182 stars 22 forks source link

babel-generator and babel-helpers npm dependencies needed? #55

Closed jtomaszewski closed 7 years ago

jtomaszewski commented 7 years ago

I'm trying to compile the assets on staging/production but I've received errors that babel-helpers and babel-generator are missing. (I didn't have them included in package.json but even with that, it worked on my dev environment).

Example message of the error:

Schmooze::DependencyError: Cannot find module 'babel-helpers'. You need to add it to '/myproject/releases/20161222022105/package.json' and run 'npm install'
... stacktrace

Is it something we should add to README? (only babel-core is mentioned there atm) Seems like its required by https://github.com/Shopify/sprockets-commoner/blob/7180a07f1c3ac0d7d9abf59bd3b270a87f535bf5/lib/sprockets/commoner/bundle.rb .

jtomaszewski commented 7 years ago

Sorry, my bad. I think I've had too old version of nodejs on my staging server.

If anybody encounters it, upgrade your nodejs & npm, and then rm -rf node_modules and install it again.