使用 npm install 时出错(npm ERR!Windows_NT 6.3.9600)
Error while using npm install (npm ERR! Windows_NT 6.3.9600 )
大家好,我在尝试通过 npm 安装软件包时遇到以下错误。我为此使用的操作系统是 windows 8。它在 Ubuntu 上运行完美。请帮我解决这个问题。
C:\Users\xxxxx>npm install -g jshint
npm ERR! registry error parsing json
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\\node.exe" "C:\Program Files\node\node_modules\npm\bin\npm-cli.js" "install" "-g" "jshint"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! Unexpected token <
npm ERR! <html>
npm ERR! <head>
npm ERR! </head>
npm ERR! <body>
npm ERR! We are sorry but this is temporarily unavailable.
npm ERR! <!-- Site Not Found. -->
npm ERR! </body>
npm ERR! </html>
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\xxxxx\npm-debug.log
我找到了这个问题的解决方案(至少就我而言)。
注册表的 url 已过时。
请看这个 link:
Can't install any packages in Node.js using "npm install"
谢谢。
就我而言,在 Windows 上升级 npm 需要手动步骤以确保 PowerShell/CMD 找到新版本的 npm。这是微软DX工程师为npm和Node制作的一个小工具,将流程简化为一个简单的命令。
更多详情查看npm-windows-upgrade
我通过回滚到早期版本的节点解决了这个问题
nvm ls(查看安装的节点版本)
nvm use *.**(选择要使用的版本)
你可以使用这一步
1. install latest node js from https://nodejs.org/en/
2.Run CMD with "Run as Administrator"
3.npm install -g angular-cli
会运行
大家好,我在尝试通过 npm 安装软件包时遇到以下错误。我为此使用的操作系统是 windows 8。它在 Ubuntu 上运行完美。请帮我解决这个问题。
C:\Users\xxxxx>npm install -g jshint
npm ERR! registry error parsing json
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\\node.exe" "C:\Program Files\node\node_modules\npm\bin\npm-cli.js" "install" "-g" "jshint"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! Unexpected token <
npm ERR! <html>
npm ERR! <head>
npm ERR! </head>
npm ERR! <body>
npm ERR! We are sorry but this is temporarily unavailable.
npm ERR! <!-- Site Not Found. -->
npm ERR! </body>
npm ERR! </html>
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\xxxxx\npm-debug.log
我找到了这个问题的解决方案(至少就我而言)。 注册表的 url 已过时。 请看这个 link: Can't install any packages in Node.js using "npm install"
谢谢。
就我而言,在 Windows 上升级 npm 需要手动步骤以确保 PowerShell/CMD 找到新版本的 npm。这是微软DX工程师为npm和Node制作的一个小工具,将流程简化为一个简单的命令。 更多详情查看npm-windows-upgrade
我通过回滚到早期版本的节点解决了这个问题
nvm ls(查看安装的节点版本)
nvm use *.**(选择要使用的版本)
你可以使用这一步
1. install latest node js from https://nodejs.org/en/
2.Run CMD with "Run as Administrator"
3.npm install -g angular-cli
会运行