Home > Blockchain >  Truffle DApp truffle development test error - the Windows operating environment
Truffle DApp truffle development test error - the Windows operating environment

Time:09-22

Just contact the truffle framework, to fit the experimental project, as a result, truffle test error, confused about...

Truffle environment + ganache (graphical)

# # # below is the operation process

Compile, error-free migration contract process, log normal!!!!!!
Then execute the truffle test contract error
Specific error # # #
` ` `
TestAdoptionPets
1) "before all the hooks: prepare suite


0 passing (554 ms)
1 failing

1) TestAdoptionPets
"Before all" hook: prepare suite:
TypeError: Error parsing J:/truffle_workplace/AdoptionPets/bare - box/contracts/AdoptionPets. Sol: always destructure property ` body ` of 'undefined' or 'null'.
At getImports (C: \ Users \ 11712 \ AppData \ Roaming \ NPM, node_modules, truffle, build \ webpack: \ packages \ the compile - solidity \ profiler \ getImports js: 5-1)
At findContracts. Then. Then (C: \ Users \ 11712 \ AppData \ Roaming \ NPM, node_modules, truffle, build \ webpack: \ packages, compile - solidity, profiler, index, js: 145:1)
` ` `
# # # # # display error message of
* * always destructure property ` body ` of 'undefined' or 'null' * *

CodePudding user response:

Trouble bosses to help see ~ ~ ~ ~

CodePudding user response:

I met this problem, also can not find the answer

CodePudding user response:

This problem, for the back of the compilation and deployment as if do not have what influence

CodePudding user response:

refer to the second floor qq_40215078 response:
I met this problem, also can not find the answer
see my hair stick son, truffle version problem

CodePudding user response:

And may be a truffle version. SQL file version does not conform to the code inside, you see what version of the contract is inside.
  • Related