本人 Nodejs 小白 因项目需要 需要搭建 NodejS + sails 环境
输入以下 指令
npm -g install sails
提示下面的错误 我已经是在root下
> [email protected] preinstall /usr/local/lib/node_modules/sails
node ./lib/preinstall_npmcheck.js
sh: node: command not found
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "-g" "install" "sails"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] preinstall: node ./lib/preinstall_npmcheck.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] preinstall script 'node ./lib/preinstall_npmcheck.js'.
npm ERR! This is most likely a problem with the sails package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./lib/preinstall_npmcheck.js
npm ERR! You can get their info via:
npm ERR! npm owner ls sails
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /private/var/root/npm-debug.log