简体   繁体   English

Node/NPM:如果我升级我的节点版本,我应该重建包锁定文件吗?

[英]Node/NPM: If I upgrade my node version, should I rebuild the package-lock file?

I am using node version 11 and want to use 12.6.我正在使用节点版本 11 并想使用 12.6。 I had the package-lock.json file committed.我提交了 package-lock.json 文件。 When upgrading, should I remove my node module, npm install , and commit the new package-lock.json file?升级时,我应该删除我的节点模块npm install并提交新的package-lock.json文件吗?

No, node updates are backward compatible.不,节点更新是向后兼容的。

In package.json, there's a property called engine to specify which versions of node.js that package can be used, when upgrading to new node version please check that. In package.json, there's a property called engine to specify which versions of node.js that package can be used, when upgrading to new node version please check that.

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Github说我在package-lock(cryptiles)中有一个Node安全漏洞,但是它没有安装在package.json中而且我没有使用它,解决方案呢? - Github says I have a Node security vulnerability in package-lock (cryptiles) but it's not installed in package.json and I'm not using it, solutions? 如果我更改节点版本并安装 npm ,package-lock.json 中的 package 版本是否更改? - If I change the node version and do npm install, does the package versions in package-lock.json change? 不同的包锁定来自不同的npm版本 - Different package-lock results from different npm versions 如何在Node 5.6.0环境中运行Node 6 npm软件包? - How can I run a Node 6 npm package in a Node 5.6.0 environment? 根据节点版本,我可以使用哪个npm版本是否有限制? - Are there constraints on which npm version I can use based on my node version? 我应该添加 npm-shrinkwrap.json、package-lock.json 还是 yarn.lock? - Should I add npm-shrinkwrap.json, package-lock.json or yarn.lock? 如果我不是节点程序,但我想使用Bower,我应该安装node和npm吗? - Should i install node and npm if i am not a node programme but i want to use bower? 运行“npm i”时遇到节点版本问题 - Having trouble with node version when running 'npm i' 如何升级 Node 文件中的特定包? - How to upgrade a specific package inside a Node file? 当我从 npm6 升级到 npm7 时,为什么要构建 node-sass? - Why is node-sass being built when I upgrade from npm6 to npm7?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM