找不到scss-bundle命令 [英] scss-bundle command not found
问题描述
我确实在Mac上通过 npm install scss-bundle -g
全局安装了 scss-bundle
,但是当我运行命令 scss-bundle -e时,./projects/primeng-lib/src/style/_styles.scss -d ./dist/primeng-lib/style/_styles.scss
,我收到错误 bash:scss-bundle:命令找不到
I did install scss-bundle
globally with npm install scss-bundle -g
on Mac but when I'm running the command scss-bundle -e ./projects/primeng-lib/src/style/_styles.scss -d ./dist/primeng-lib/style/_styles.scss,
I'm getting error bash: scss-bundle: command not found
推荐答案
我怀疑是因为您的npm前缀值不在系统的 PATH
环境变量上.前缀将显示要安装全局安装的模块的目录.
I suspect it's because your npm prefix value isn't located on your system's PATH
environment variable. The prefix will display the directory where your globally installed modules are to be installed.
也许您可以尝试以下方法,看看是否有帮助:
Perhaps you could try the following and seeing if this helps:
-
查找您的 npm前缀环境变量的值:
npm前缀-g
检查系统的 PATH
环境变量的值,并确保步骤1中的 npm前缀
位置位于此路径内:
Check the value of your system's PATH
environment variable and ensure your npm prefix
location from step 1 is located within this path:
echo $ PATH
如果此前缀位置不在您的 PATH
环境变量上,则有两种方法可以解决此问题:
If this prefix location isn't on your PATH
environment variable you've two options to resolve this issue:
-
在您的
.bashrc
文件中调整系统的PATH
环境变量,以添加上一节中第1步中给出的前缀位置.类似于以下内容:
Adjust your system's
PATH
environment variable, within your.bashrc
file, to add the prefix location given in step 1 from the prior section. Something along the lines of:
export PATH = $ PATH:< path_to_npm_prefix>来源〜/.bashrc
调整您的npm前缀,使其指向系统路径环境已经在寻找的位置,然后重新安装 scss-bundle
,类似以下内容:
Adjust your npm prefix to point to a location where your system's path environment is already looking then reinstall scss-bundle
, something along the lines of:
npm config设置前缀/usr/localnpm i -g scss-bundle
希望有帮助!
这篇关于找不到scss-bundle命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!