3 ms·
Distribution problems you mention in Java are not handled by NPM at all and are not related to how you store dependencies (in Java). Not sure why you mention it
by Sankozi 4y ago
Distribution problems you mention in Java are not handled by NPM at all and are not related to how you store dependencies (in Java). Not sure why you mention it.
NPM dependency resolution is neither simpler nor faster compared to Maven. You have two commands for installing dependencies:
slow one (npm install) that updates package-lock based on config file developer use
faster one (npm ci) is based on package-lock cache-like file that is hard to read, you cannot be sure package-lock file is correct for current config file without running npm install, different versions of NPM will create different package-lock files
Both commands are slower and more buggy compared to Maven. Clearing dependency directory (node_modules) and trying again installing is a common practice when working with NPM. NPM is fast and correct only if it acts as a script runner - i.e. it is calling JS libraries (that are expected to be installed, NPM will not check that for you).
I find putting dependencies inside project folder to be most stupid design decision of NPM (second one is choosing json for configuration file syntax).
NPM's simplicity seems to be related only to its implementation (but somehow it did not prevent it being the most buggy cli tool I have ever used). It is basically a dependency downloader with script runner capabilities.