问题
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:
Look up the value of your npm prefix environment variable:
npm prefix -g
Check the value of your system's
PATH
environment variable and ensure yournpm 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:
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
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