全局安装的npm-packages不工作 [英] globally installed npm-packages not working
问题描述
local npm-packages如预期工作,但是我似乎不可能获得全局安装的软件包运行。它不会引发任何错误,它只是不做任何事情(快递,咖啡等)
local npm-packages work as predicted, but it seems impossible for me to get globally-installed packages running. It doesn't even throw any error, it's just not doing anything ( express, coffee, etc.. )
这不是打扰我,直到我想使用咖啡-脚本。
This was not bothering me much until I wanted to use coffee-script.
我已经检查的内容(我在Xubuntu 12.04上):
things I allready checked ( I'm on Xubuntu 12.04 ):
- npm列出它
- 其安装在/ usr / local / bin
- npm via(npm | apt-get)
-
已卸载nodejs,并将新的git重建到/ opt / bin / node
- npm lists it
- its installed in /usr/local/bin
- ( updated | uninstalled | reinstalled ) npm via ( npm | apt-get )
uninstalled nodejs and did fresh git-rebuild to /opt/bin/node
=>
任何人都知道解决方案吗?
anyone knows a solution?
推荐答案
证明它试图从节点
开始,而不是 nodejs
命令。所以在 / usr / local / lib / node_modules / coffee-script / bin / coffee
我改变了#!/ usr / bin / env node
到
#!/ usr / bin / env nodejs
turns out it tried to start with node
instead of nodejs
command. So in /usr/local/lib/node_modules/coffee-script/bin/coffee
I changed #!/usr/bin/env node
to #!/usr/bin/env nodejs
and works fine now.
这篇关于全局安装的npm-packages不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!