Angularjs Windows 7中未安装angular cli

Angularjs Windows 7中未安装angular cli,angularjs,Angularjs,如何解决这类错误 C:\>npm install -g angular-cli npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\ node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "angular-cli" npm ERR! node v7.4.0 npm ERR! npm

如何解决这类错误

C:\>npm install -g angular-cli
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "angular-cli"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5

npm ERR! Cannot read property 'path' of null
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "angular-cli"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! code ECONNRESET

npm ERR! network socket hang up
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network setti
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "angular-cli"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! path C:\npm-debug.log.928650742
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall open

npm ERR! Error: EPERM: operation not permitted, open 'C:\npm-debug.log.92865074
'
npm ERR!  { Error: EPERM: operation not permitted, open 'C:\npm-debug.log.92865
742'
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path: 'C:\\npm-debug.log.928650742' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\npm-debug.log

C:\>
C:\>npm安装-g
npm错误!Windows NT 6.1.7601
npm错误!argv“C:\\Program Files\\nodejs\\node.exe”C:\\Program Files\\nodejs\
node\u modules\\npm\\bin\\npm cli.js“install”“-g”“angular cli”
npm错误!节点v7.4.0
npm错误!npm v4.0.5
npm错误!无法读取null的属性“path”
npm错误!
npm错误!如果需要帮助,您可以在以下位置报告此错误:
npm错误!
npm错误!Windows NT 6.1.7601
npm错误!argv“C:\\Program Files\\nodejs\\node.exe”C:\\Program Files\\nodejs\
node\u modules\\npm\\bin\\npm cli.js“install”“-g”“angular cli”
npm错误!节点v7.4.0
npm错误!npm v4.0.5
npm错误!代码ECONREET
npm错误!网络套接字挂起
npm错误!网络这很可能不是npm本身的问题
npm错误!与网络连接相关。
npm错误!网络在大多数情况下,您位于代理服务器后面或网络设置不正确
gs。
npm错误!网络
npm错误!网络如果您在代理后面,请确保
npm错误!网络“代理”配置设置正确。请参阅:“npm帮助配置”
npm错误!Windows NT 6.1.7601
npm错误!argv“C:\\Program Files\\nodejs\\node.exe”C:\\Program Files\\nodejs\
node\u modules\\npm\\bin\\npm cli.js“install”“-g”“angular cli”
npm错误!节点v7.4.0
npm错误!npm v4.0.5
npm错误!路径C:\npm-debug.log.928650742
npm错误!代码EPERM
npm错误!errno-4048
npm错误!系统调用打开
npm错误!错误:EPERM:不允许操作,打开“C:\npm-debug.log.92865074”
'
npm错误!{错误:EPERM:不允许操作,打开'C:\npm-debug.log.92865'
742'
npm错误!错误号:-4048,
npm ERR!代码:“EPERM”,
npm ERR!系统调用:“打开”,
npm ERR!路径:“C:\\npm debug.log.928650742'}
npm错误!
npm错误!请以root/管理员身份再次尝试运行此命令。
npm错误!请在任何支持请求中包括以下文件:
npm错误!C:\npm-debug.log
C:\>

我也遇到了类似的问题,我通过删除节点并安装最新版本解决了这个问题,在此之前我还清理了节点缓存目录
npm cache clean