我正在尝试使用this tut安装gulp,我收到以下错误。我不确定为什么,也许我的目录选择?我正在使用msysGit。
0 info it worked if it ends with ok
1 verbose cli [ 'c:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'c:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'init' ]
2 info using npm@2.6.0
3 info using node@v0.12.0
4 silly package data undefined
5 info init written successfully
6 verbose stack Error: Invalid name: "sudo npm install -g gulp"
6 verbose stack at ensureValidName (c:\Users\username\AppData\Roaming\npm\node_modules\npm\node_modules\normalize-package-data\lib\fixer.js:322:15)
6 verbose stack at Object.module.exports.fixNameField (c:\Users\username\AppData\Roaming\npm\node_modules\npm\node_modules\normalize-package-data\lib\fixer.js:211:5)
6 verbose stack at c:\Users\username\AppData\Roaming\npm\node_modules\npm\node_modules\normalize-package-data\lib\normalize.js:30:38
6 verbose stack at Array.forEach (native)
6 verbose stack at normalize (c:\Users\username\AppData\Roaming\npm\node_modules\npm\node_modules\normalize-package-data\lib\normalize.js:29:15)
6 verbose stack at final (c:\Users\username\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:367:33)
6 verbose stack at then (c:\Users\username\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:126:33)
6 verbose stack at c:\Users\username\AppData\Roaming\npm\node_modules\npm\node_modules\read-package-json\read-json.js:316:48
6 verbose stack at evalmachine.<anonymous>:265:20
6 verbose stack at OpenReq.Req.done (c:\Users\username\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:141:5)
7 verbose cwd c:\workstuff
8 error Windows_NT 6.1.7601
9 error argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "init"
10 error node v0.12.0
11 error npm v2.6.0
12 error Invalid name: "sudo npm install -g gulp"
13 error If you need help, you may report this error at:
13 error <http://github.com/npm/npm/issues>
14 verbose exit [ 1, true ]