Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lifecycleScripts/preinstall.js weird npm check #1063

Closed
philkunz opened this issue Jun 29, 2016 · 2 comments
Closed

lifecycleScripts/preinstall.js weird npm check #1063

philkunz opened this issue Jun 29, 2016 · 2 comments

Comments

@philkunz
Copy link

philkunz commented Jun 29, 2016

lifecycleScripts/preinstall.js

Why is there a test for the npm version in line 13 for which npm version is installed? It causes my builds to fail, removing this check lets them pass just fine... meaning with the check in place npm 3 works fine, npm 2 fails.

In other words why is npm 3 handled differently from npm 2?

@johnhaley81
Copy link
Collaborator

When you override npm lifecycle scripts things behave differently in npm@2 and npm@3. With 3 you'll still install all packages under dependencies but with 2 you have to explicitly ignore the scripts to install them. Since the lifecycle scripts themselves require those packages they must be installed before the script continues.

How is it breaking for you?

@philkunz
Copy link
Author

philkunz commented Jul 1, 2016

Why not move all of this stuff to a postinstall script?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants