【问题标题】:I am unable to get the command that should help me in running the website on local host我无法获得可以帮助我在本地主机上运行网站的命令
【发布时间】:2020-02-04 08:36:57
【问题描述】:

这里是 package.json

   {
      "name": "complete",
      "version": "1.0.0",
      "description": "Implemented an ethereum smart contract in Solidity to develop an online MarketPlace 
       where people can buy, sell products, ask for a refund, check transaction status etc. The client side 
       pages are served by a Flask server.",
      "main": "truffle-config.js",
      "directories": {
        "test": "test"
      },
      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1"
      },
      "author": "",
      "license": "ISC"
    }

这是错误

 npm run test 

> complete@1.0.0 test F:\complete
> echo "Error: no test specified" && exit 1

"Error: no test specified"
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! complete@1.0.0 test: `echo "Error: no test specified" && exit 1`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the complete@1.0.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\HP\AppData\Roaming\npm-cache\_logs\2020-02-04T08_30_37_917Z-debug.log

【问题讨论】:

  • 我不知道我是否理解你的问题......但尝试运行命令:npm run start
  • 我们已经尝试过这个命令,但仍然显示同样的问题
  • 请查看错误您知道如何解决此类错误。

标签: web blockchain ethereum solidity truffle


【解决方案1】:

您必须在脚本字段中提供测试命令。

例如:我使用 mocha 进行测试

"scripts": {
  "test": "mocha"
}

【讨论】:

    猜你喜欢
    • 2016-09-16
    • 2020-07-10
    • 2018-01-11
    • 2015-12-24
    • 1970-01-01
    • 1970-01-01
    • 2016-10-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多