Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
尝试安装Angular Cli或更新当前Node.js版本时出错_Node.js_Angular_Angular Cli - Fatal编程技术网

尝试安装Angular Cli或更新当前Node.js版本时出错

尝试安装Angular Cli或更新当前Node.js版本时出错,node.js,angular,angular-cli,Node.js,Angular,Angular Cli,我是新手。所以为了学习angular,我试着安装了它。但是它给了我以下的错误 我也尝试更新我的节点。但这也失败了 我使用了以下命令。。。。。。 npm安装npm-g(用于npm更新) npm安装-g@angular/cli(用于角度更新) 我当前的节点版本是8,操作系统是Win10 错误为 npm ERR! errno ENOTFOUND npm ERR! network request to https://registry.npmjs.org/@angular%2fcli failed, r

我是新手。所以为了学习angular,我试着安装了它。但是它给了我以下的错误

我也尝试更新我的节点。但这也失败了

我使用了以下命令。。。。。。 npm安装npm-g(用于npm更新) npm安装-g@angular/cli(用于角度更新)

我当前的节点版本是8,操作系统是Win10

错误为

npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/@angular%2fcli failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org 
registry.npmjs.org:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.

检查配置设置:
npm配置列表

然后,您可以添加或更改代理设置:

npm config set http-proxy http://your_proxy_ip:port
npm config set https-proxy http://your_proxy_ip:port

答案就在这里:

请参考此站点,它包括更新节点的所有方法

我在npm 6.0.9中遇到了问题,我做到了: 我在powershell中使用npm安装-g@angular/cli
这是正确的

您是否将其安装在公司pc上?可能是代理问题?