Reputation: 868
Let's say that I have dependency X
version 1.0 and dependency Y
version 1.0 in package.json
. If Y
requires X
version 2.0 (which I know because I looked in package-lock.json
), will I still be able to use X
version 1.0 in my code without issues?
Upvotes: 0
Views: 30
Reputation: 707238
With a couple of assumptions about good module behavior, it is perfectly feasible for two modules of differing versions to be in use in the same app.
Here are some of the things a "good behavior" module must do in order to allow this:
req.someProp
property that could cause problems. But, if both versions weren't in use on the same requests or both were being used for different functionality, then this could work just fine.will I still be able to use X version 1.0 in my code without issues?
So, it's certainly possible, but it depends upon the behavior of the module and what exactly it does globally or with shared resources.
Upvotes: 1