johnpapa / lite-server

Lightweight node server
MIT License
2.32k stars 268 forks source link

lite-server not installing using (npm install lite-server -g) #202

Closed younasm closed 3 years ago

younasm commented 3 years ago

I am running ethereum project in my new macbook when i run npm start it's not working so i run the command to install lite-server but it's give me the error.

below is my package.json

{
  "name": "ethereumreviewsystem",
  "version": "0.0.1",
  "description": "web based prototype of review and reward system",
  "main": "truffle.js",
  "directories": {
    "test": "test"
  },
  "scripts": {
    "start": "lite-server",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Younas",
  "license": "ISC",
  "devDependencies":{
    "lite-server": "^2.3.0"
  },
  "dependencies": {
    "ipfs-api": "^26.1.2",
    "jquery": "^3.6.0"
  }
}

Environment

younasm commented 3 years ago

I find the solution. 1 step: delete node_module and package-lock.json. 2 step: open terminal in that file and run npm install. 3 step: build your project and run npm start.

Happy coding 😊