I've just unboxed the Metacoin example from Truffle http://truffleframework.com/boxes/metacoin

When I run truffle test on it in VS Code I get the following error:

1) TestMetacoin "before all" hook: prepare suite:
 Error: Could not find artifacts for /D/TruffleTest/contracts/ConvertLib.sol from any sources
at Resolver.require (C:\Users\MyPuter\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\truffle-resolver\index.js:37:1)
  at TestResolver.require (C:\Users\MyPuter\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\truffle-core\lib\testing\testresolver.js:17:1)
  at TestResolver.require (C:\Users\MyPuter\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\truffle-core\lib\testing\testresolver.js:17:1)
  at C:\Users\MyPuter\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\truffle-core\lib\testing\soliditytest.js:141:1
  at Array.forEach (<anonymous>)
  at C:\Users\MyPuter\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\truffle-core\lib\testing\soliditytest.js:140:1
  at C:\Users\MyPuter\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\truffle-deployer\src\deferredchain.js:20:1
  at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:188:7)

I've done nothing to the downloaded example and just followed the step by step from https://medium.com/@wslyvh/get-started-with-ethereum-solidity-on-windows-1672e9953a1

Any ideas why it's failing the before all part in the test? truffle Compile works fine.

I've also just extracted the example folder directly from the download link and ran the truffle test from powershell on that folder and getting exactly the same issue. Im a bit lost.

1 Answer 1


Thanks to this post I just found: "Truffle test" fails in petshop tutorial

I found the issue was caused by what looks like a bug introduced in 4.1.5 of truffle. After I rolled the npm package back to 4.1.4 all worked as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.