Reputation: 23514
Not sure this is possible, but I need to override the version of a dependency's dependency. Specifically, I have this in my package.json
:
"dependencies": {
"connect": "*"
}
connect
then has a dependency on "formidable": "1.0.11"
. I need connect
to use version 1.0.13
of formidable
.
Is it possible to override connect
's dependency without cloning that project?
Upvotes: 4
Views: 1935
Reputation: 43
You can set "formidable": "1.0.13" at your package.json and if other package (in this case connect) which depends on formidable has appropriate condition to formidable version they will share single formidable package. In case of latest connect it doesn't work because it has "formidable": "1.0.11" at package.json and if you set "1.0.13" at your package.json you will get two formidable installed ("1.0.13" as your direct dependency and "1.0.11" as connect dependency). AFAIK, it's impossible to override dependency in this case.
Upvotes: 1