使用 npm 管理器安装 grunt 时出现连接问题
installing grunt using npm manager having connection issues
嘿,我正在尝试使用 NPM 管理器安装 G运行t,但我似乎遇到了连接超时问题,我在网上搜索了一些。我可以点击这个 URL https://registry.npmjs.org/grunt 就好了它会问我是否要保存或 运行 GRUNT.JSON 如果我剪切并粘贴那个 URL 我会在一个巨大的数组
中查看 JSON 的内容
GEL8953@VALGEL8953L MINGW64 ~/Dev/MillsDashboard/MillsDashboard (master)
$ npm install grunt grunt-cli -g
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/grunt-cli
npm ERR! Error: connect ETIMEDOUT
npm ERR! at errnoException (net.js:901:11)
npm ERR! at Object.afterConnect [as oncomplete] (net.js:892:19)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program
Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "grunt"
"grunt-cli" "-g"
npm ERR! cwd C:\Users\GEL8953\Dev\MillsDashboard\MillsDashboard
npm ERR! node -v v0.10.13
npm ERR! npm -v 1.3.2
npm ERR! syscall connect
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm
从项目根目录执行命令 "npm i grunt" 时,我得到以下内容
GEL8953@VALGEL8953L MINGW64 ~/Dev/MillsDashboard/MillsDashboard (master)
$ npm i grunt
npm ERR! Error: Invalid name: "MillsDashbaord"
npm ERR! at ensureValidName (C:\Program Files
(x86)\nodejs\node_modules\npm\node_modu
les\read-package-json\node_modules\normalize-package-
data\lib\fixer.js:281:15)
npm ERR! at Object.module.exports.fixNameField (C:\Program Files
(x86)\nodejs\node_mo
dules\npm\node_modules\read-package-json\node_modules\normalize-package-
data\lib\fixer.js :196:5)
npm ERR! at C:\Program Files
(x86)\nodejs\node_modules\npm\node_modules\read-package-
json\node_modules\normalize-package-data\lib\normalize.js:29:38
npm ERR! at Array.forEach (native)
npm ERR! at normalize (C:\Program Files
(x86)\nodejs\node_modules\npm\node_modules\re
ad-package-json\node_modules\normalize-package-
data\lib\normalize.js:28:15)
npm ERR! at final (C:\Program Files
(x86)\nodejs\node_modules\npm\node_modules\read-p
ackage-json\read-json.js:310:33)
npm ERR! at then (C:\Program Files
(x86)\nodejs\node_modules\npm\node_modules\read-pa
ckage-json\read-json.js:124:33)
npm ERR! at C:\Program Files
(x86)\nodejs\node_modules\npm\node_modules\read-package-
json\read-json.js:284:48
npm ERR! at fs.js:207:20
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program
Files (x86)\no
dejs\node_modules\npm\bin\npm-cli.js" "i" "grunt"
npm ERR! cwd C:\Users\GEL8953\Dev\MillsDashboard\MillsDashboard
npm ERR! node -v v0.10.13
npm ERR! npm -v 1.3.2
您可能需要设置注册表:
npm set registry https://registry.npmjs.org/
卸载并清理缓存:
npm uninstall -g grunt-cli
npm cache clean
npm i -g grunt-cli
缩小包含您的箱子和控制器的 MillsDashboard。
npm i grunt
你在防火墙后面吗?代理?
嘿,我正在尝试使用 NPM 管理器安装 G运行t,但我似乎遇到了连接超时问题,我在网上搜索了一些。我可以点击这个 URL https://registry.npmjs.org/grunt 就好了它会问我是否要保存或 运行 GRUNT.JSON 如果我剪切并粘贴那个 URL 我会在一个巨大的数组
中查看 JSON 的内容GEL8953@VALGEL8953L MINGW64 ~/Dev/MillsDashboard/MillsDashboard (master)
$ npm install grunt grunt-cli -g
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/grunt-cli
npm ERR! Error: connect ETIMEDOUT
npm ERR! at errnoException (net.js:901:11)
npm ERR! at Object.afterConnect [as oncomplete] (net.js:892:19)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program
Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "grunt"
"grunt-cli" "-g"
npm ERR! cwd C:\Users\GEL8953\Dev\MillsDashboard\MillsDashboard
npm ERR! node -v v0.10.13
npm ERR! npm -v 1.3.2
npm ERR! syscall connect
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm
从项目根目录执行命令 "npm i grunt" 时,我得到以下内容
GEL8953@VALGEL8953L MINGW64 ~/Dev/MillsDashboard/MillsDashboard (master)
$ npm i grunt
npm ERR! Error: Invalid name: "MillsDashbaord"
npm ERR! at ensureValidName (C:\Program Files
(x86)\nodejs\node_modules\npm\node_modu
les\read-package-json\node_modules\normalize-package-
data\lib\fixer.js:281:15)
npm ERR! at Object.module.exports.fixNameField (C:\Program Files
(x86)\nodejs\node_mo
dules\npm\node_modules\read-package-json\node_modules\normalize-package-
data\lib\fixer.js :196:5)
npm ERR! at C:\Program Files
(x86)\nodejs\node_modules\npm\node_modules\read-package-
json\node_modules\normalize-package-data\lib\normalize.js:29:38
npm ERR! at Array.forEach (native)
npm ERR! at normalize (C:\Program Files
(x86)\nodejs\node_modules\npm\node_modules\re
ad-package-json\node_modules\normalize-package-
data\lib\normalize.js:28:15)
npm ERR! at final (C:\Program Files
(x86)\nodejs\node_modules\npm\node_modules\read-p
ackage-json\read-json.js:310:33)
npm ERR! at then (C:\Program Files
(x86)\nodejs\node_modules\npm\node_modules\read-pa
ckage-json\read-json.js:124:33)
npm ERR! at C:\Program Files
(x86)\nodejs\node_modules\npm\node_modules\read-package-
json\read-json.js:284:48
npm ERR! at fs.js:207:20
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program
Files (x86)\no
dejs\node_modules\npm\bin\npm-cli.js" "i" "grunt"
npm ERR! cwd C:\Users\GEL8953\Dev\MillsDashboard\MillsDashboard
npm ERR! node -v v0.10.13
npm ERR! npm -v 1.3.2
您可能需要设置注册表:
npm set registry https://registry.npmjs.org/
卸载并清理缓存:
npm uninstall -g grunt-cli
npm cache clean
npm i -g grunt-cli
缩小包含您的箱子和控制器的 MillsDashboard。
npm i grunt
你在防火墙后面吗?代理?