Dependency Version Conflicts on node.js

I am new to the world of node.js and I asked how I can handle conflics dependency configurations (which often appear with transitive dependencies): on the Internet I found only this article useful to me http://nodejs.org/api/modules.html #modules_addenda_package_manager_tips .

It seems to me that I do not need to worry about conflicts due to the way packages are managed in node.js. Am I mistaken, am I missing something? It seems strange (but still makes sense) for me, I'm used to handling dependencies with maven, setting up transitive dependencies that don't need to be loaded.

Any help is appreciated, thanks.

+6
source share
1 answer

npm , and the node require system will take care of this for you automatically. For example, your program may depend on dep1 and dep2 . dep1 may require subdep version 1.0, and dep2 may require subdep version 2.0, and npm will install multiple versions so that each module gets the necessary dependency versions.

 your-module/ node_modules/ dep1/ node_modules/ subdep/ (1.0) dep2/ node_modules/ sudbep/ (2.0) 
+6
source

Source: https://habr.com/ru/post/945939/


All Articles