如何解决 Angular-cli 安装中的代码 ERR_INVALID_URL

mid*_*owu 3 node.js npm angular-cli

在我的 windows-10 中,我安装了:

Nodejs-v16.13.0

npm-v8.1.0

当我尝试运行 npm install -g @angular/cli 时

我收到这个错误:

npm 错误!代码 ERR_INVALID_URL

npm 错误!无效的网址

我如何获得这个决心?

谢谢

小智 5

我只是使用以下命令重新配置代理:

npm config set proxy http://username:password@host:port 
Run Code Online (Sandbox Code Playgroud)

成功了!