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"
},
CodePudding user response:
if this is the full code of your package.json
, then I think your JSON code is not valid. Because you are missing closing }
. And where is the dependency object?
This would be
package.json
{
"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"
}
}
CodePudding user response:
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.