scss-bundle command not found

送分小仙女□ 提交于 2019-12-24 12:34:05

问题


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


回答1:


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:

  1. Look up the value of your npm prefix environment variable:

    npm prefix -g

  2. 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

If this prefix location isn't on your PATH environment variable you've two options to resolve this issue:

  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> source ~/.bashrc

  2. 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 set prefix /usr/local npm i -g scss-bundle

Hopefully that helps!



来源:https://stackoverflow.com/questions/57298227/scss-bundle-command-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!