问题:
After I upgraded to latest stable node and npm , I tried npm install moment --save . 升级到最新的稳定node和npm ,我尝试了npm install moment --save 。 It saves the entry in the package.json with the caret ^ prefix. 它将条目以尖号^保存在package.json 。 Previously, it was a tilde ~ prefix. 以前,它是一个波浪号~前缀。
- Why are these changes made in
npm? 为什么在npm进行这些更改? - What is the difference between tilde
~and caret^? 是什么波浪之间的区别~和尖^? - What is the advantages over others? 与其他相比有什么优势?
解决方案:
参考一: https://stackoom.com/question/1VkUa/package-json中的tilde-和caret-有什么区别参考二: https://oldbug.net/q/1VkUa/What-s-the-difference-between-tilde-and-caret-in-package-json
来源:oschina
链接:https://my.oschina.net/u/3797416/blog/4295353