NeravP
NeravP

Reputation: 35

How to open live server from the terminal in VSCode?

I am very new to coding and am currently learning Javascript. I cant seem to open the liveserver from my terminal in VSCode.

I get the below message:

////
live-server : The term 'live-server' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that     
the path is correct and try again.
At line:1 char:1
+ live-server
+ ~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (live-server:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException 
////

Pls help.

Thanks

Upvotes: 1

Views: 15012

Answers (1)

Razieh Boroon
Razieh Boroon

Reputation: 106

First, you should verify that node.js is installed.

node -v

Then install the live-server package:

npm install -g live-server

If you still had issue related to (....ps1 cannot be loaded because running scripts is disabled on this system..... ) run this script in powershell:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

good luck! installing live server restricted access to run script

Upvotes: 9

Related Questions