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

'live-server' is not recognized as an internal or external command, operable program or batch file.

Open seyedasfar opened this issue 5 years ago • 29 comments

I installed live-server as a global package but I got this message Capture

seyedasfar avatar May 04 '19 11:05 seyedasfar

Did you install the package globally?

abachi avatar May 23 '19 22:05 abachi

Did you install the package globally?

yeah, I did,

npm i -g live-server

seyedasfar avatar May 26 '19 09:05 seyedasfar

This is occurring in my monorepo as well. Child projects are not able to find live-server although it is present in .bin directory inside node_modules

ps011 avatar Sep 19 '19 11:09 ps011

after installig npm install -g live-server then i type live-server it is showing like ---'live-server' is not recognized as an internal or external command, operable program or batch file.

Is there any solution to fix this issue

Radha-4235 avatar Sep 22 '19 05:09 Radha-4235

same problem here

ExceededRed avatar Oct 10 '19 00:10 ExceededRed

Has anyone one ever found a solution ? I’m having the same issue here, in the trillo project.

Zestios avatar Oct 23 '19 02:10 Zestios

In the trillo project I just installed it locally with 'npm install live-server --save-dev' and it works, but I don't know if it's better than to install it globally

GeorgeMitsikaris avatar Nov 20 '19 17:11 GeorgeMitsikaris

But how to install the package globally? I have the same problem while NPM RUN START

Saahib avatar Dec 03 '19 10:12 Saahib

Had the same issue because I had installed live-server as an extension in VSCode. Try installing through npm globally with "npm install -g live-server" and run start script again. Fixed it for me.

santisagg avatar Jan 05 '20 08:01 santisagg

Had the same issue because I had installed live-server as an extension in VSCode. Try installing through npm globally with "npm install -g live-server" and run start script again. Fixed it for me.

That worked for me, thank you

robertozh29 avatar Mar 25 '20 21:03 robertozh29

npm install live-server --save-dev

Hi guys,this worked for me as well.Thanks very much

tikavalery avatar Apr 18 '20 04:04 tikavalery

hello guys, i'm having a problem in trillo's project, i can't run my normal "npm run start" command and i'm having problem installing the node-sass, even while i followed his command in the command line which is "npm install"....pls i need help!!! i've been sourcing for answers but none.

Zucci-Daniel avatar Aug 19 '20 17:08 Zucci-Daniel

hello guys, i'm having a problem in trillo's project, i can't run my normal "npm run start" command and i'm having problem installing the node-sass, even while i followed his command in the command line which is "npm install"....pls i need help!!! i've been sourcing for answers but none.

what you get when executing the command

npm -v

seyedasfar avatar Aug 31 '20 00:08 seyedasfar

I'm getting a -bash: live-server: command not found error when running live-server command. Did an uninstall and reinstalled, same issue. MacOS, npm 7.0.3.

image

Zeesy avatar Oct 25 '20 19:10 Zeesy

_ THIS IS HOW IT WORKED FOR ME!_

I just installed it locally with 'npm install live-server --dev-save' next, in the package.json file, I've added "server": "live-server" in the scripts block. it works by running 'npm run server' in the command prompt. live-server

Rai321han avatar Mar 10 '21 15:03 Rai321han

How do I fix this error ? Please! Help me..

"Error: listen EACCES: permission denied 0.0.0.0:8080"

image

pramit-marattha avatar Jun 06 '21 15:06 pramit-marattha

How do I fix this error ? Please! Help me..

"Error: listen EACCES: permission denied 0.0.0.0:8080"

image

Oh, wait!! Solved it 😅 If you are having the same issue just change the port to a different port number. It might be because of some port conflict.

liver-server --port=2468 index.html

pramit-marattha avatar Jun 06 '21 15:06 pramit-marattha

For me adding "%appdata%\npm" to path worked. To know how to set path you can follow this tutorial https://www.java.com/en/download/help/path.html Also after adding it to path make sure that you restart the terminal. If you are using a code editor's terminal (in my case WebStorm) and if it's still not working try restarting the editor or open a CMD window in the project directory. It should work by now. If it still doesn't work go to %appdata%\npm in the file explorer and check if you find a live-server.cmd file. image If you don't find it there you will have to reinstall the package.

joel122002 avatar Sep 03 '21 05:09 joel122002

npm install -g live-server

working for me, thanks

jaroslavdusek1 avatar Sep 16 '21 14:09 jaroslavdusek1

If this is not working, try this too:

  1. Go to edit environment variables
  2. Click on the PATH and than edit it
  3. At the end of the line, put a (semicolon = ;)
  4. set the location of your npm package to it. EX: (C:\Users------\Roaming\npm;) if you are using windows 7, set the view of your windows to show hidden files, cuz the appdata folder is hidden. I hope this was helpful

ali-khanix avatar Aug 03 '22 05:08 ali-khanix

try typing npx live-server in the terminal to run

DonnovanJiles70122 avatar Apr 10 '23 22:04 DonnovanJiles70122

Thanks, @DonnovanJiles70122 . I haven't had to use Live Server to render something in probably a year or more and somehow this is the first comment I've seen where it was suggested to use npx to run. Thanks for saving the day. 🙌

drod1107 avatar Apr 20 '23 18:04 drod1107

help me guys please no one way is work for me i tried almost every way .

Hari-Kode avatar Jun 24 '23 06:06 Hari-Kode

It's not a final solution but if you're using VS Code then just having the extension installed is enough - there's a button in the bottom ribbon across the bottom of the window in vs code which says something like "go live" and clicking that will automatically launch it in live server.

You can also delete both live-server globally and also locally in your project kill your node modules folder, package-lock.json, and any cache folders (like dist or parcel-cache depending on the stack you're using) and then rerun the live-server install. Sometimes I've had this issue because some other package installed some dependency that's the same dep but a different version number and the conflict kept live-server from finding the dep IT needed. Can't hurt to try. 🤷🏻‍♂️

drod1107 avatar Jun 24 '23 12:06 drod1107

npm install -g live-server

try npx live-server

ABHI2211998 avatar Jul 13 '23 20:07 ABHI2211998

1.firstly check your computer whether the node.js is installed or not (if not: downloaded from internet)(command promt) 2.after installed the node js go to command prompt type ' npm install -g live-server' (command promt) 3. go to vs code ( help>new terminal) and then type: 'set-ExecutionPolicy RemoteSigned -Scope CurrentUser ' 4.after execuction type:'Get-ExecutionPolicy' 5.again execution type:'Get-ExecutionPolicy -list'. 6. after that type : 'live-server'
7. done

problem solved.

yadunandanks avatar Sep 03 '23 13:09 yadunandanks

1.firstly check your computer whether the node.js is installed or not (if not: downloaded from internet)(command promt) 2.after installed the node js go to command prompt type ' npm install -g live-server' (command promt) 3. go to vs code ( help>new terminal) and then type: 'set-ExecutionPolicy RemoteSigned -Scope CurrentUser ' 4.after execuction type:'Get-ExecutionPolicy' 5.again execution type:'Get-ExecutionPolicy -list'. 6. after that type : 'live-server' 7. done

problem solved.

yadunandanks avatar Sep 03 '23 13:09 yadunandanks

solved. thx

ne 3. 9. 2023 v 15:38 odesílatel yadunandanks @.***> napsal:

1.firstly check your computer whether the node.js is installed or not (if not: downloaded from internet)(command promt) 2.after installed the node js go to command prompt type ' npm install -g live-server' (command promt) 3. go to vs code ( help>new terminal) and then type: 'set-ExecutionPolicy RemoteSigned -Scope CurrentUser ' 4.after execuction type:'Get-ExecutionPolicy' 5.again execution type:'Get-ExecutionPolicy -list'. 6. after that type : 'live-server' 7. done

problem solved.

— Reply to this email directly, view it on GitHub https://github.com/tapio/live-server/issues/312#issuecomment-1704309329, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATVATXLHS6LPLPQNI4B4CVTXYSB5LANCNFSM4HKYV7JQ . You are receiving this because you commented.Message ID: @.***>

-- S pozdravem, Jaroslav Dušek

  • 420 770 132 352

http://www.linkedin.com/in/jaroslav-dušek-b98212205

jaroslavdusek1 avatar Sep 03 '23 21:09 jaroslavdusek1

I'm getting a -bash: live-server: command not found error when running live-server command. Did an uninstall and reinstalled, same issue. MacOS, npm 7.0.3.

image

I'm getting a -bash: live-server: command not found error when running live-server command. Did an uninstall and reinstalled, same issue. MacOS, npm 7.0.3.

image

Did you solved this issue, current struggling with this issue

guled153 avatar Sep 09 '23 10:09 guled153