Closed boneskull closed 7 years ago
@gojko npm prepublish
is running before the installation on npm install
, and it fails because of that, some info here: https://github.com/npm/npm/issues/10074
I think I found the cause, it should work now with node 4.3.2 and npm 2.14.12 (so the same versions you're using). You may need to delete node_modules before installing again.
If the shrinkwrap file was out of date, this is a problem yarn was created to solve. The lock file simply can't get out of sync. Just a suggestion!
I've migrated the build to NPM@4 which has a separate prepublishOnly event, so shrinkwrap is no longer triggered after install. This means that the shrinkwrap is still generated when I publish the new version, but people who just want to install will not trigger that event, even with earlier versions of NPM
After cloning,
npm install
succeeds.npm install
fails.npm install
Removing
npm-shrinkwrap.json
and retryingnpm install
seems to avoid the problem.I'd suggest removing
npm shrinkwrap
from theprepublish
script, and/or adopting yarn or using something like publish-please instead.