为什么我没有“咖啡”的命令?

时间:2022-03-19 16:23:26

I have node and npm on my Centos 7 instance. I did a

我在Centos 7实例上有node和npm。我做了一个

sudo npm -g install coffee

And it reported no errors. But I don't have a coffee executable, which was kind of the point.

报告没有错误。但是我没有咖啡的可执行文件,这是关键。

%: type -a coffee
coffee not found
%: type -a Coffee
Coffee not found

It seems like I should need something for NPM on my $PATH. If I knew what to add, I would try that.

看来我需要在我的$PATH上为NPM准备一些东西。如果我知道该怎么补充,我就试试。

I'm not sure how to debug this, sorry. I've tried this:

我不知道怎么调试,抱歉。我已经试过这个:

%: npm bin
/home/jonea/node_modules/.bin

Interestingly, that's not a directory that exists:

有趣的是,这个目录并不存在

%: ls -la ~/node_modules
total 12
drwxr-xr-x  3 jonea compgen 4096 Jun  6 10:34 .
drwxr-xr-x 33 jonea compgen 4096 Jun  7 09:33 ..
drwxr-xr-x  4 jonea compgen 4096 Jun  6 10:34 coffee

And, no, there are no executables in that coffee directory.

而且,不,在那个咖啡目录中没有可执行文件。

If anyone has ideas about other debugging I can do, I'll append the results here.

如果有人对我能做的其他调试有想法,我将在这里附加结果。

2 个解决方案

#1


4  

The package you installed has nothing to do with CoffeeScript check this npm coffee

您所安装的软件包与CoffeeScript检查这个npm咖啡没有关系

You need different package

你需要不同的包

npm install -g coffeescript

#2


-1  

sudo npm -g install coffee-script

安装咖啡脚本

#1


4  

The package you installed has nothing to do with CoffeeScript check this npm coffee

您所安装的软件包与CoffeeScript检查这个npm咖啡没有关系

You need different package

你需要不同的包

npm install -g coffeescript

#2


-1  

sudo npm -g install coffee-script

安装咖啡脚本