I believe this is pretty common question, but still I could not find reliable answer.
In my package.json I have dependency - "grunt-selenium-webdriver", which has some dependency version listed in its package.json which is not accessible from our network (we are using internal NPM registry which lags sometimes).
I want to use current version of grunt-selenium-webdriver but with different version of nested dependency. Is this possible anyhow?
PS: I tried peer dependencies, but it seems that it aims to solve another issue.
NPM installs devDependencies within the package. json file. The 'npm install' command should add all the dependencies and devDependencies automatically during installation. If you need to add specific devDependencies to your project, you can use this command- 'npm install --save-dev'.
When you run npm init twice then it's update the package. json file as per your new init data you enter in last npm init call. Save this answer.
You can achieve this by NPM-Shrinkwrap functionality.
Other examples can be found on managing-node-js-dependencies-with-shrinkwrap.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With