[英]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.我正在尝试使用 truffle 创建一个 Dapp,但是当我到达使用命令 npm run dev 的阶段时,它给了我一个错误,说 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"
},
if this is the full code of your package.json
, then I think your JSON code is not valid.如果这是您的package.json
的完整代码,那么我认为您的 JSON 代码无效。 Because you are missing closing }
.因为你错过了关闭}
。 And where is the dependency object?依赖对象在哪里?
This would be package.json
这将是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"
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.