Could not find artifacts for Solidity tests (Windows only, v4.1.5)
See original GitHub issue- I’ve asked for help in the Truffle Gitter before filing this issue.
Issue
In Version v4.1.5 truffle test will throw errors, If I downgrade the truffle version to v4.0.4 , it will work
TestMyContract 1) “before all” hook: prepare suite 0 passing (625ms) 1 failing
- TestMyContract “before all” hook: prepare suite: Error: Could not find artifacts for “path”
Steps to Reproduce
Truffle test
Environment
- Operating System: Windows 10
- Truffle version (
truffle version
): v4.1.5
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:15 (7 by maintainers)
Top Results From Across the Web
The reason for "Could not find artifacts for" in truffle?
I got the same problem just now, but I solved it in this way. After your compilation, go to your_folder_location\build\contracts folder.
Read more >Truffle test fails with Error: Could not find artifacts
I updated my nodejs lastest, and installed window-build-tools,it does not work. TestAdoption.sol: pragma solidity ^0.5.0; import "truffle/Assert ...
Read more >Compile contracts - Truffle Suite
Artifacts of your compilation will be placed in the build/contracts/ directory, relative to your project root. (This directory will be created if it...
Read more >Truffle documentation
This is a test file written in Solidity which ensures that your ... This blockchain is local to your system and does not...
Read more >ConsenSys/truffle - Gitter
That error means it can't locate truffle-default-builder ... suite: Error: Could not find artifacts for openzeppelin-solidity/contracts/GSN/Context.sol from ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@woodenchalet @ismaelbej I tried to reproduce this using the MetaCoin project but wasn’t able (I’m on OSX). I’d like to figure out if this is Windows specific or if my model for the bug is wrong. My directory structure looked like this:
Imports at the top of
MetaCoin.sol
look like this:Imports at the top of
TestMetaCoin.sol
look like this:Output is as expected:
Also tried running
compile
beforetest
and everything worked. Should the project structure above trigger the error based on what you’ve seen in your own project?I’ll try to create a small reproducible example for now the stack trace output
The file
Parser/Tx.sol
is a dependency ofRelayTests
but compilation and migration run fine. Also executing javascript test will run without issues.And the solidity test, but I think the content doesn’t matter too much because it is never run.