Re:Disabling npm's progress bar yields a 2x npm install spee...
by krisdol on Tuesday January 26, 2016 @05:10PM
(#10976557)
Could you expand on that? What causes it to be nondeterministic? I haven't had that experience but it's the second time I've read someone reference this behavior
[ Parent
| on HN ]
Re:Disabling npm's progress bar yields a 2x npm install spee...
by dandelany on Tuesday January 26, 2016 @05:35PM
(#10976750)
Here are details from the docs: https://docs.npmjs.com/how-npm-works/npm3-nondet
Re:Disabling npm's progress bar yields a 2x npm install spee...
by kemitchell on Tuesday January 26, 2016 @06:30PM
(#10977088)
> 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.
Re:Disabling npm's progress bar yields a 2x npm install spee...
by krisdol on Tuesday January 26, 2016 @06:56PM
(#10977206)
That explains why I haven't experienced it -- our projects' npm scripts to build packages wipe out that folder before building.
Re:Disabling npm's progress bar yields a 2x npm install spee...
by yunong on Tuesday January 26, 2016 @05:29PM
(#10976711)
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.
Re:Disabling npm's progress bar yields a 2x npm install spee...
by Wintamute on Tuesday January 26, 2016 @06:25PM
(#10977051)
From 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?
Re:Disabling npm's progress bar yields a 2x npm install spee...
by madeofpalk on Wednesday January 27, 2016 @06:47AM
(#10979542)
My 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.
Re:Disabling npm's progress bar yields a 2x npm install spee...
by kemitchell on Tuesday January 26, 2016 @06:32PM
(#10977099)
What's the error on the build that fails?