node.js 使用 npm install 时出错(npm ERR!Windows_NT 6.3.9600)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30988708/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error while using npm install (npm ERR! Windows_NT 6.3.9600 )
提问by Rahul
Hi all I am getting the following error while trying to install a package via npm. The operating system i am using for this is windows 8. It works perfectly on Ubuntu. Please help me resolve this issue.
大家好,我在尝试通过 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
采纳答案by Rahul
I got a solution for this question (at least in my case). The url for the registry was out dated. Please see this link: Can't install any packages in Node.js using "npm install"
我得到了这个问题的解决方案(至少在我的情况下)。注册表的 URL 已过时。请参阅此链接: 无法使用“npm install”在 Node.js 中安装任何软件包
Thank you.
谢谢你。
回答by Shailesh Singh
In my case , Upgrading npm on Windows requires manual steps to ensure that PowerShell/CMD find the new version of npm. This is a small tool made by Microsoft DX engineers with for npm and Node, reducing the process to a simple command. For more detail view npm-windows-upgrade
就我而言,在 Windows 上升级 npm 需要手动步骤以确保 PowerShell/CMD 找到新版本的 npm。这是微软 DX 工程师为 npm 和 Node 制作的一个小工具,将过程简化为一个简单的命令。有关更多详细信息,请查看npm-windows-upgrade
回答by Mahesh singh chouhan
You can use this step
您可以使用此步骤
1. install latest node js from https://nodejs.org/en/
2.Run CMD with "Run as Administrator"
3.npm install -g angular-cli
It will run
它会运行
回答by Itai Shperber
I solved the issue by rolling back to an earlier version of node
我通过回滚到早期版本的节点解决了这个问题
nvm ls (to see versions of node installed)
nvm use *.** (choose version to use)
nvm ls(查看安装的节点版本)
nvm 使用 *.**(选择要使用的版本)

