4 ms·
I have a project that's shrinkwrapped. I check out a new copy of the project and run `npm install`. My co-worker does the exact same thing, his fails, yet mine
by yunong 11y ago
I have a project that's shrinkwrapped. I check out a new copy of the project and run `npm install`. My co-worker does the exact same thing, his fails, yet mine successfully builds. An install of a shrink-wrapped should be deterinistic, i.e. either succeed or fail, but not both.
- Wintamute 11y agoFrom that doc page it sounds like that should be deterministic? Even without shrinkwrapping, a fresh install from package.json with empty node_modules should be deterministic. > The npm install command, when used exclusively to install packages from a package.json, will always produce the same tree. This is because install order from a package.json is always alphabetical. Same install order means that you will get the same tree. > You can reliably get the same dependency tree by removing your node_modules directory and running npm install whenever you make a change to your package.json. Maybe you're experiencing a bug, rather than some in-grained non-determinism in npm?
- madeofpalk 11y agoMy understanding is that even when you fix your dependencies to exact versions, your dependencies probably haven't so without shrink-wrap you'll never know _exactly_ what gets installed.
- kemitchell 11y agoWhat's the error on the build that fails?