current position:Home>During the construction of DAPP project in pet shop, an error is reported when the truss test command is executed

During the construction of DAPP project in pet shop, an error is reported when the truss test command is executed

2022-02-03 23:01:56 Q & A of Denglian community

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

Compiling your contracts...

Compiling .\contracts\Adoption.solCompiling .\contracts\Migrations.solCompiling .\test\TestAdoption.solArtifacts written to C:\Users\10173\AppData\Local\Temp\test-202065-23036-1kpubwl.2qnxCompiled successfully using:

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

TestAdoption1) "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 The operation steps are in accordance with the :.png solve ? Guys, help Mengxin !!!






Other answers 1:


Other answers 2:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032301547604.html

Random recommended