Re:Show HN: Auto install npm dependencies as you code
by randallsquared on Monday August 08, 2016 @01:02PM
(#12249207)
Given that in npm v3 the order of installation determines where things are installed, this seems like it might cause some interesting bugs that never happen on the developer's machine. :)
[ Parent
| on HN ]
Re:Show HN: Auto install npm dependencies as you code
by Etzos on Monday August 08, 2016 @01:49PM
(#12249566)
I'm not sure how this could happen as one shouldn't be depending on the directory structure in the node_modules/ folder anyway. Do you have an example of where this might cause issues?
Re:Show HN: Auto install npm dependencies as you code
by randallsquared on Monday August 08, 2016 @05:11PM
(#12250900)
Well, one shouldn't... :)
I don't actually know that there's any problem that `rm node_modules; npm install` won't solve, since that would make things the same as a fresh install.
All of the scenarios I could come up with were about long-running installs, rather than new deploys, so more likely to happen on dev than prod.
ETA: actually wrong, see below.
Re:Show HN: Auto install npm dependencies as you code
by Etzos on Monday August 08, 2016 @05:26PM
(#12250999)
I can't think of any scenario when one would be relying on a specific structure being in the node_modules/ directory. And if there is such a need, then it's likely the code is doing something very strange or very special in which case this kind of package would not even be considered during creation (and I still think wouldn't cause problems).
Even in long-running installs I still don't see a potential issue here. Do you have a small specific example you can think of?
Re:Show HN: Auto install npm dependencies as you code
by randallsquared on Monday August 08, 2016 @07:08PM
(#12251433)
Package A depends on lodash: ^4.6.1
Package B depends on lodash: ^4.14.2
... you know what? I just installed semver to check my beliefs, and it turns out I'm just spreading FUD. Caret doesn't work the way I thought it did.
Please disregard.
Re:Show HN: Auto install npm dependencies as you code
by siddharthkp on Monday August 08, 2016 @02:04PM
(#12249682)
Wow, I'll have to look that up. Thanks!