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
The operation steps are in accordance with the ： solve ？ Guys, help Mengxin ！！！
Other answers 1：
Other answers 2：
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
The sidebar is recommended
- I don't know what to do when I encounter a problem
- Mobile terminal (mobile phone) Wallet
- Mobile Wallet
- Failed to create a project with truss init, showing unbox failed
- Invalid JSON RPC response
- Development of Ethereum web Wallet
- Deployment of Ethereum Wallet
- The login jump cannot be realized during DAPP development
- Compilation of geth failed
- Chain Wallet
guess what you like
Metamask transfer problem
Server directory configuration
Using Web3's methods myMethod. The send method cannot change the data in the smart contract
PHP obtains the Ethereum keystore private key. The password is always wrong. There is a problem with the algorithm
About blockchain soft bifurcation
truffle unbox RequestError
Error entering truss control
DAPP deployment issues
Metamask transfer error
Truss deployment contract
- What are the advantages and disadvantages of embark and truss?
- The environment chooses Web3 but cannot discover the network
- How to start gananche through websocket
- Construction of Ethernet private chain
- The ledger is getting bigger and bigger. Can the node store it?
- Ethereum distributed storage
- Smart contract function call problem
- web3. JS calls the return value of the smart contract function through sendtransaction
- truffle init/unbox RequesrError
- POST https://ipfs.infura.io:5001/api/v0/add?stream -channels=true net::ERR_ CONNECTION_ TIMED_ Out as shown in the figure
- Lite sever installation
- Unable to play function
- Practical application of blockchain
- Event event
- Contract deployment issues
- Uniswap docking addliquidity displays false transaction mined but execution failed
- Uniswap docking ethtokenswapinput displays false transaction mined but execution failed
- Solid structure variable
- How can multi node blockchain achieve high availability
- How to obtain the public variables of the structure in the contract in web3js through the "public variable automatic creation getter()" mentioned in the solidity document
- The problem of obtaining the variable value in the structure state in the contract by web3js
- I want to transfer the token from the contract address to another address. How do you write this
- May I ask you a question about the duplicate name of erc20 token?
- May I ask you about the problem of solid code audit?
- Can the wallet address be traded at the private chain node at will?
- The mongodb database of EOS blockchain node is a separate host. Can this push the node's data to an independent database host
- The problem of keystore storage directory
- Deploy two smart contracts and how to call the functions in one JS
- I successfully created a local development chain to visit https://substrate-ui.parity.io When, it shows that I am not connected to the node.
- Event filtering in web3js
- Information for learning ring signature
- At present, can smart contracts only be implemented on the web? Use ether js。 If you want to make a good web page into a mobile app or wechat applet, is there any way
- The send transactions' from 'field must be defined appears when calling the contract method (including parameters)!
- Erc20 transfer to contract address
- Store the data on the chain according to the structure format. The read string type data can be returned in the original format, while uint type data is BN type,
- Running on win10 -- Practice Guide: an error occurred when building a zero knowledge proof DAPP demo
- How smart contracts receive and transfer usdt (erc20)
- Local simulation test open source code
- Why is the transfer authorization unsuccessful