3 ms·
The article contains some false assumptions and false statements > Having your node_modules checked in guarantees that two developers running the code are runn
by littlecranky67 5y ago
The article contains some false assumptions and false statements
> Having your node_modules checked in guarantees that two developers running the code are running the exact same code with the exact same set of dependencies.
No, it doesn't, your system environment is important. Any code executed can check for environment parameters and branch accordingly. For example, a simple "if (macOSVersion === "10.10") {} else { }" would run different code branches and possibly produce different results, even when executing the same code binaries.
The reason you don't check in node_modules is that differences in system env during build time produces different build results - checking in node_modules fixes that, but does not handle system differences at runtime.