how to update node.js 6.x to 8.x in windows operating sysytem using CLI

南笙酒味 提交于 2019-12-22 06:45:47

问题


i am unable to run angular 6 CLI on node.js 6.x its showing error that upgrade minimum node.js 8.xx to use angular CLI.

i tried with this code :

npm install -g npm-windows-upgrade npm-windows-upgrade


回答1:


Just download the latest version of nodejs and install it without uninstalling the previous version, the older version will be rewritten with the newer one. you wouldn't be having any compatibility issues.




回答2:


First, ensure that you can execute scripts on your system by running the following command from an elevated PowerShell. To run PowerShell as Administrator, click Start, search for PowerShell, right-click PowerShell and select Run as Administrator.

Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force

npm install --global --production npm-windows-upgrade
npm-windows-upgrade

Want to just install the latest version? Sure:

npm-windows-upgrade --npm-version latest


来源:https://stackoverflow.com/questions/51243385/how-to-update-node-js-6-x-to-8-x-in-windows-operating-sysytem-using-cli

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!