在代理服务器后面的 Windows 上安装 angular-cli

2024-01-04

我目前正在公司代理服务器后面构建 Angular 2 演示,该演示存在阻止 NPM 和 TypeScript“打字”安装的已知问题。虽然我已经能够通过代理服务器设置解决这些问题,但我有点不确定如何处理最新问题。

每当我尝试全局安装 angular-cli 时:

npm install -g angular-cli

甚至本地到具有现有目录的目录npm init设置(包括package.json文件):

npm install angular-cli --save

我收到以下错误(所有本地路径都替换为 ):

angular-cli npm 安装错误

npm ERR! Error: EPERM: operation not permitted, rename 
'C:\Users\<PATH>\node_modules\angular-cli\node_modules\babel-runtime' ->
'C:\Users\<PATH>\node_modules\angular-cli\node_modules\.babel-runtime.DELETE'
at FSReqWrap.oncomplete (fs.js:82:15)
npm ERR! Please try running this command as root/Administrator.

还有其他人遇到此特定用户权限问题的问题(或解决方案)吗?

Thanks.


要在代理服务器后面加载 npm 模块,您需要在 node.js 终端中输入以下命令:

  1. npm 配置设置代理http://proxy.company.com:8080 http://proxy.company.com:8080
  2. npm 配置设置 https 代理http://proxy.company.com:8080 http://proxy.company.com:8080
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在代理服务器后面的 Windows 上安装 angular-cli 的相关文章

随机推荐