[英]How to revert from node.js 4.0.0 to 0.12.x?
The current node.js 4.0.0 breaks some ionic workflows . 当前的node.js 4.0.0 破坏了一些离子工作流程 。 How to revert to 0.12.x on OS X? 如何在OS X上还原为0.12.x? My 4.0.0 is installed from the Mac OS X Installer . 我的4.0.0是从Mac OS X安装程序安装的 。
Popular gist here to uninstall node. 流行的要点在这里卸载节点。 Then I would install nvm . 然后我将安装nvm 。
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
With nvm installed you can install whatever version of node you want, eg nvm install v12.0.0
, then to make that the default you can nvm alias default v12.0.0
. 安装了nvm后,您可以安装所需的任何版本的节点,例如nvm install v12.0.0
,然后将其设置为默认值,可以使用nvm alias default v12.0.0
。
You could also reinstall 4.0.0 using nvm with nvm install v4.0.0
, and then if you want to play around with the newest version just nvm use v4.0.0
, then when you don't want to risk it breaking anything, revert to an older version. 您还可以使用nvm和nvm install v4.0.0
重新安装4.0.0,然后,如果您想使用最新版本,只需nvm use v4.0.0
,然后当您不想冒险破坏任何内容时,恢复为旧版本。 I didn't bother with nvm for quite a while, but now I highly recommend it. 我已经很长时间没有使用nvm了,但是现在我强烈推荐它。 Have a read through the repo README and get acquainted with it. 阅读回购自述文件并熟悉它。 You won't look back! 你不会回头!
Use nvm
, n
or compile it yourself. 使用nvm
, n
或自己编译。
For example n 0.12
does the job. 例如, n 0.12
完成这项工作。 You can get it via npm install n -g
您可以通过npm install n -g
获得它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.