如何使用CLI在Windows操作系统中将node.js 6.x更新到8.x [英] how to update node.js 6.x to 8.x in windows operating sysytem using CLI

查看:82
本文介绍了如何使用CLI在Windows操作系统中将node.js 6.x更新到8.x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在node.js 6.x上运行angular 6 CLI.它显示的错误是升级了最低的node.js 8.xx以使用angular CLI.

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.

我尝试使用此代码:

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

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

推荐答案

首先,通过在提升的PowerShell中运行以下命令,确保可以在系统上执行脚本.要以管理员身份运行PowerShell,请单击开始",搜索PowerShell,右键单击PowerShell,然后选择以管理员身份运行".

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

这篇关于如何使用CLI在Windows操作系统中将node.js 6.x更新到8.x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆