3 ms·
I have never had a package break between dev and prod when using versions like ^x.x.x. Also, you need to test and ideally stage before deployment. If you don'
by ilaksh 10y ago
I have never had a package break between dev and prod when using versions like ^x.x.x.
Also, you need to test and ideally stage before deployment.
If you don't want to deploy with `npm i` then just copy the files or compress and then copy that and uncompress.
Also the new flat modules reduce the total install time.
The author advocates copy-pasting code rather than including small modules. To me this is very misguided.
Npm is the greatest code-reuse system ever created. The failure of software engineers to recognize that is an indication to me of a lack of depth of engineering knowledge and experience.
Deploys may take a few minutes. You just need to factor that and don't switch off prod servers until updated ones are ready.
- merb 10y agoCode reuse is fine, but taking that over the top is not fine. The same with Java some things actually do too much. Especially dealing with many external dependencies is a real pain. A really big one.
- ilaksh 10y agoI found the many dependencies to be a pain very early on when I was not specifying versions in my package.json. Now I use npm i --save which gets versions so.. it really is not a pain to have many dependencies with npm. In Java and many other systems, yes, it is very painful. npm is different.
- AgentME 10y ago> I have never had a package break between dev and prod when using versions like ^x.x.x. I've run into it. Dependencies get bugs sometimes. Easy to pin versions with npm's shrinkwrap though. >The author advocates copy-pasting code rather than including small modules. To me this is very misguided. Yeah, I'm surprised how often people suggest this is the obvious solution as if it's not without its own problems. One of the things I dread most about working on a new codebase is finding an ancient version of some library code copy-pasted into the codebase with the inevitable unlabeled (and probably not high-quality) customizations made to it. Trying to figure out whether the library's documentation still applies, whether it still passes its original upstream tests with the customizations, or whether the copy can be safely replaced with a newer upstream version is painful.