简体   繁体   English

我可以将Sails项目升级到新版本的nodejs吗? 如果可能,我该怎么办?

[英]Can I upgrade my Sails project to a new version of nodejs? If possible, how do I do it?

我有一个项目使用nodejs版本0.12.7,我想将我的项目更新到节点7.0.0

You shouldn't have to upgrade your project. 您不必升级项目。 You just need to upgrade Node. 您只需要升级Node。 Here's a tutorial on how to install a new version of Node alongside the old version, so that if anything doesn't work with the new one, you can switch to the old one. 这是一本有关如何在旧版本旁边安装新版本Node的教程 ,因此,如果新版本无法正常工作,则可以切换到旧版本。

I'd suggest copying the project to some other place, cleaning node_modules and doing npm install to see how it works. 我建议将项目复制到其他地方,清理node_modules并进行npm install看看它是如何工作的。

You may get problems with new versions of npm modules if their API changed so you may need to specify exact versions of modules that are known to work in your package.json. 如果新版本的npm模块的API发生更改,您可能会遇到问题,因此您可能需要指定已知可在package.json中工作的模块的确切版本。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM