1

I created a new folder in Windows 10 and opened it in Visual Studio Code. After creating 'index.html' at the root, I ran the following commands:

npm init

npm install --save-dev lite-server

I added the following, under scripts, in package.json:

"start": "lite-server"

After that, when I ran 'npm start' it opened a new tab in my browser (http://localhost:3000) but my 'index.html' is not loaded (instead I saw 'no internet'). No other process was running on port 3000.

Could you help me load 'index.html' by running 'npm start' please?

MAK
  • 1,915
  • 4
  • 20
  • 44

1 Answers1

0

First try this line instead of your second line. It is not in the same order which it should be according to this, https://github.com/johnpapa/lite-server

npm install lite-server --save-dev

Same happened to me in MacOS. I did this and it worked. So if the above does not work, run as administrator in windows 10 and try!

rm -rf node_modules/
sudo npm install
Gayal Kuruppu
  • 1,261
  • 1
  • 17
  • 29