[英]-bash: <npm package> command not found
I have been working on a site for several weeks, and just recently I ran into a problem. 我在一个网站上工作了几个星期,而最近我遇到了一个问题。 Now whenever I try to run gulp or JSPM, I get the following errors: 现在,每当我尝试运行gulp或JSPM时,都会出现以下错误:
-bash: gulp: command not found -bash:gulp:找不到命令
-bash: jspm: command not found -bash:jspm:找不到命令
Uninstalling and reinstalling Node and NPM hasn't seemed to have helped. 卸载和重新安装Node和NPM似乎没有帮助。 I've also installed both Gulp and JSPM globally just now, and still have the same issue. 我现在也已经在全球范围内安装了Gulp和JSPM,但仍然存在相同的问题。
I'm working on a Mac while a colleague of mine is using Windows. 我的同事正在使用Windows时,我正在Mac上工作。 Using the same codebase, everything seems to be working for him fine in Windows. 使用相同的代码库,一切似乎在Windows中都可以正常工作。
In case it helps, here's what my $PATH looks like: /usr/local/share/npm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:
如果有帮助,这是我的$ PATH样子: /usr/local/share/npm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:
I'm happy to provide more details, although I'm not sure what other information would help. 我很乐意提供更多详细信息,尽管我不确定还有哪些其他信息会有所帮助。
Adding this here for any googlers: for a Windows 10 user you need to add %USERPROFILE%\\AppData\\Roaming\\npm
to your Path variable 在此处为所有Google员工添加此代码:对于Windows 10用户,您需要将%USERPROFILE%\\AppData\\Roaming\\npm
到您的Path变量中
%USERPROFILE%\\AppData\\Roaming\\npm
单击“新建”,然后键入%USERPROFILE%\\AppData\\Roaming\\npm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.