无法在Mac上安装crossmon-server

时间:2014-01-11 00:19:29

标签: node.js monitoring server-monitoring

这里有没有人尝试过Crossmon-server?我一直在搜索谷歌,找到任何关于我在安装过程中可能缺少的提示,但没有成功。这里介绍了基本步骤:https://npmjs.org/package/crossmon-server

我正在使用最新的Node版本v0.10.24在OS X Mavericks中安装它。运行后

richard:~ root# npm install crossmon-server并执行richard:~ root# which crossmon-server

我仍然一无所获...... crossmon-server返回-sh: crossmon-server: command not found

已更新

使用-g全局安装会导致此错误Please try running this command again as root/Administrator.因此,我同时执行sudo npm install crossmon-server -gsudo su -并重新运行安装命令,但仍然收到相同的错误消息:

> crossmon-server@0.0.15 preinstall /usr/local/lib/node_modules/crossmon-server
> npm i -g forever

npm ERR! Error: EACCES, open '/Users/rbm/.npm/28ef027b-forever.lock'
npm ERR!  { [Error: EACCES, open '/Users/rbm/.npm/28ef027b-forever.lock']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/Users/rbm/.npm/28ef027b-forever.lock' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 13.0.2
npm ERR! command "node" "/usr/local/bin/npm" "i" "-g" "forever"
npm ERR! cwd /usr/local/lib/node_modules/crossmon-server
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! path /Users/rbm/.npm/28ef027b-forever.lock
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/Users/rbm/.npm/28ef027b-forever.lock'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /usr/local/lib/node_modules/crossmon-server/npm-debug.log
npm ERR! not ok code 0
npm ERR! crossmon-server@0.0.15 preinstall: `npm i -g forever`
npm ERR! Exit status 3
npm ERR! 
npm ERR! Failed at the crossmon-server@0.0.15 preinstall script.
npm ERR! This is most likely a problem with the crossmon-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm i -g forever
npm ERR! You can get their info via:
npm ERR!     npm owner ls crossmon-server
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.0.2
npm ERR! command "node" "/usr/local/bin/npm" "install" "crossmon-server" "-g"
npm ERR! cwd /Users/rbm/workspace/prototype-int/monitoring-service
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/rbm/workspace/prototype-int/monitoring-service/npm-debug.log
npm ERR! not ok code 0

我很感激任何已经尝试过此工具的人的帮助。

提前致谢!

2 个答案:

答案 0 :(得分:0)

如果要从命令行使用crossmon-server,则必须全局安装:

npm install crossmon-server -g

答案 1 :(得分:0)

我如何解决这个问题是通过卸载我的节点来清理我的环境,删除了我的整个.node_modules并删除了这些包里面的所有可执行快捷方式.node_modules。我使用Homebrew清理安装我的节点,只是全局安装了grunt / mocha,其余只是npm install <package or module name> - crossmon-server安装在我的proto类型项目的本地。

希望这有帮助。