Issue
I install live-server globally with:
npm install -g live-server
but for some reason it is not be found and I get the following error
bash: live-server: command not found
after command
live-server
Everything is correctly installed:
/Users/username/npm-global/bin/live-server ->
/Users/username/npm-global/lib/node_modules/live-server/live-server.js
[email protected] /Users/username/npm-global/lib/node_modules/live-server
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
What am I missing here?
Solution
Add the path to your npm installation to your path. Just add this line at the end of .bash_profile
. Run it in bash first, to make sure it works before putting it in .bash_profile
export PATH=$PATH:/Users/username/npm-global/bin
Answered By - bolav Answer Checked By - Senaida (WPSolving Volunteer)