pet-shop的Dapp项目搭建中truffle test命令执行报错

BUG: C:\Users\10173\Documents\MyDapp\pet-shop-tutorial>truffle test Using network 'development'.

Compiling your contracts...

Compiling .\contracts\Adoption.sol Compiling .\contracts\Migrations.sol Compiling .\test\TestAdoption.sol Artifacts written to C:\Users\10173\AppData\Local\Temp\test-202065-23036-1kpubwl.2qnx Compiled successfully using:

  • solc: 0.5.16+commit.9c3226ce.Emscripten.clang

TestAdoption 1) "before all" hook: prepare suite

0 passing (229ms) 1 failing

1) TestAdoption "before all" hook: prepare suite: TypeError: Error parsing C:/Users/10173/Documents/MyDapp/pet-shop-tutorial/contracts/Adoption.sol: Cannot destructure property 'body' of 'undefined' as it is undefined. at getImports (C:\Users\10173\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\compile-solidity\profiler\getImports.js:5:28) at C:\Users\10173\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\compile-solidity\profiler\index.js:145:1

.png 操作步骤是按照社区中的: .png 求解?诸位大佬救救萌新吧!!!

请先 登录 后评论

2 个回答

Tiny熊
  擅长:智能合约,以太坊
请先 登录 后评论
链求君 - 区块链开发者
请先 登录 后评论
  • 2 关注
  • 0 收藏,3380 浏览
  • ZDB? 提出于 2020-07-05 16:45