全局安装的 npm-packages 不起作用 [英] globally installed npm-packages not working

查看:21
本文介绍了全局安装的 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.

things I allready checked ( I'm on Xubuntu 12.04 ):

  • 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

    => same thing..

anyone knows a solution?

解决方案

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆