我正在嘗試使用 truffle 創建一個 Dapp,但是當我到達使用命令 npm run dev 的階段時,它給我一個錯誤,說 MISSING SCRIP。我的代碼如下:
{
"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"
},
uj5u.com熱心網友回復:
您需要指定執行時要運行的命令npm run。在這種情況下node
"scripts": {
"dev": "node lite-server",
"test": "echo \"Error: no test specified\" && sexit 1"
}
您可以在此處閱讀有關該scripts物業的更多資訊。
uj5u.com熱心網友回復:
如果這是您的完整代碼package.json,那么我認為您的 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"
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/356414.html
上一篇:影像未在react.js上呈現
