prince
prince

Reputation: 1

npm ERR! Missing script: "dev"

I am trying to create a Dapp using truffle but when I reach the stage of using the command npm run dev it gives me an error saying MISSING SCRIP. my code is as follows:

{
  "name": "eth-vreg",
  "version": "1.0.0",
  "description": "Blockchain vreg Powered By Ethereum",
  "main": "truffle-config.js",
  "directories": {
    "test": "test"
  },
  "scripts": {
    
    "dev": "lite-server",
    "test": "echo \"Error: no test specified\" && sexit 1"

  },

Upvotes: 0

Views: 2863

Answers (1)

niiir
niiir

Reputation: 377

You need to specify the command to run when executing npm run. in this case node

"scripts": {
  "dev": "node lite-server",
  "test": "echo \"Error: no test specified\" && sexit 1"
}

You can read more about the scripts property here.

Upvotes: 1

Related Questions