I would like to install 1.8.x version a package, and be able to later automatically update this dependency inside the >=1.8.0 <1.9.0 range.
I tried to run this command:
npm install example-package@~1.8 --save
Unfortunately it adds this record to my package.json
:
"example-package" : "^1.8.0"
But what I want is this:
"example-package" : "~1.8.0"
How is it possible to do it with npm install
, without manually edit the package.json
file?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…