安装sails.js时出现NPM错误

时间:2017-06-08 14:17:33

标签: node.js npm sails.js

我刚刚在Windows 10计算机上安装了第一个node.js。我去了npm install sails -g安装sails.js,它出现了以下错误:

$ npm install sails -g
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program 
Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "sails" "-g"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10

npm ERR! Invalid name: "@sailshq/express"
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:\sites\Node\site1\npm-debug.log

为什么会这样做?

编辑:卸载/重新安装节点后,我现在可以安装sails.js。当我尝试创建项目时,我收到以下错误:

$ sails new site1
module.js:487
throw err;
^

Error: Cannot find module '@sailshq/lodash'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\user1\AppData\Roaming\npm\node_modules\sails\bin\sails.js:8:9)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)

0 个答案:

没有答案