live-server icon indicating copy to clipboard operation
live-server copied to clipboard

npm install -g live-server and manual way not working

Open zDrakon opened this issue 7 years ago • 13 comments

So it says successfully installed I tried this both ways however I still can't run "live-server" from my terminal in my project's workspace folder.

It just says command not found

After installing it prints out [email protected]

zDrakon avatar May 26 '17 18:05 zDrakon

Sorry if this is too late, but I'm new here. You need node.js and npm installed before live-server will work. Try this:

  1. Install npm: http://blog.npmjs.org/post/85484771375/how-to-install-npm
  2. Install node.js: https://nodejs.org/en/download/package-manager/
  3. Install live-server (you might have to do it manually): https://github.com/tapio/live-server Note: npm install -g didn't work for me in Step 3, but sudo npm install -g did. I still had some errors, but live-server seems to work without any issues, for now at least.

Hope this helps. Cheers.

styles225 avatar Nov 03 '17 15:11 styles225

THANK YOU @styles225 !!! THAT WAS A HUGE HELP!! ( can you tell I'm happy :) :) :) ) ... it was the ' sudo' that did the trick for me!!! ( thx @zDrakon for the original question! )

beowulf2112 avatar Apr 10 '18 19:04 beowulf2112

Hi i am relatively new to JavaScript, hope I am in the right thread with this comment. I recently downloaded ATOM and Visaul studios and every time I tried to get the Live-server to work it said 'Application not found' . So i d/l node.js and installed nmp and and live-server on the command prompt, but I am still getting the same errors. Any help would be really appreciated.

peter543210 avatar May 09 '18 01:05 peter543210

Hello, I cannot install Live Server on my Mac. It says checkPermissions Missing write access to /usr/local/lib/node_modules.

This is the message:

npm WARN deprecated [email protected]: The package has been renamed to open npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! path /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] npm ERR! stack: npm ERR! 'Error: EACCES: permission denied, access '/usr/local/lib/node_modules'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' }

melomelo926 avatar Apr 13 '19 00:04 melomelo926

Hello, should I use sudo npm install -g live-server? But the word Password appears in the next line.

melomelo926 avatar Apr 13 '19 01:04 melomelo926

hi if it is too late, if you are using sudo command to install it would ask a password as it goes to admin account. so for password you have to use your password which you use to sign in or lets say your computer password.

isworthapa avatar Jan 23 '20 03:01 isworthapa

While installing live-server on windows ,I too got error.Please help me to remove this.Thanks in advance.

This is error shown: npm WARN deprecated [email protected]: The package has been renamed to open C:\Users\Owner\AppData\Roaming\npm\live-server -> C:\Users\Owner\AppData\Roaming\npm\node_modules\live-server\live-server.js npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\live-server\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

scrap2312 avatar Feb 14 '20 09:02 scrap2312

hi , while entering live-server in windows cmd i m getting error:listen eacces :permission denied but while installing live server i didn't get any error. plz help me to remove this.

amit47chauhan avatar Apr 02 '20 17:04 amit47chauhan

Try right clicking on the cmd app, then run as administrator.

styles225 avatar Apr 02 '20 18:04 styles225

Sorry if this is too late, but I'm new here. You need node.js and npm installed before live-server will work. Try this:

  1. Install npm: http://blog.npmjs.org/post/85484771375/how-to-install-npm
  2. Install node.js: https://nodejs.org/en/download/package-manager/
  3. Install live-server (you might have to do it manually): https://github.com/tapio/live-server Note: npm install -g didn't work for me in Step 3, but sudo npm install -g did. I still had some errors, but live-server seems to work without any issues, for now at least.

Hope this helps. Cheers.

i tried following these steps for live-server : command not found following --> https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally#manually-change-npms-default-directory then i re install live-server it din work Then i followed your steps as npm and node-version was already installed ---> sudo npm install -g live-server but still same error persist. Please Help

anshulk31 avatar May 09 '20 08:05 anshulk31

I was having the same issue:
I kept getting this error when I tried to run "live-sever"

bash: live-server: command not found or fish: live-server: command not found

I installed npx per: https://www.npmjs.com/package/npx

Now, by running: npx live-server I can get the server to run.

13thRooney avatar Jan 04 '21 01:01 13thRooney

Run these command in terminal :

  1. Check that node.js is installed ( node -v )
  2. Install live server using npm ( npm install live-server -g )
  3. If windows says restricted access, run this command ( Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted ) After this type live-server and it works !!

lakpro avatar Jul 03 '22 22:07 lakpro

3. Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

Thanks a lot, this worked awesomely.

Ehiremen26 avatar Apr 05 '24 22:04 Ehiremen26