Source "truffle/Assert.sol" not found
See original GitHub issueWhile trying to compile the TestAdoption.sol
part of the tutorial, I come across this issue.
the code is:
pragma solidity ^0.4.17;
import “truffle/Assert.sol”; import “truffle/DeployedAddress.sol”; import “…/contracts/Adoption.sol”;
contract TestAdoption{ Adoption adoption= Adoption(DeployedAddresses.Adoption()); }
Issue Analytics
- State:
- Created 5 years ago
- Comments:10
Top Results From Across the Web
Error: Could not find truffle/Assert.sol from any sources
Running truffle test from the command line should import the Assert.sol library if truffle was installed globally (using npm install -g ...
Read more >"truffle/Assert.sol" & "truffle/DeployedAddresses.sol" not found ...
Issue With truffle 4.0.5 on windows, test files fail to "import" with error: 'Error' ParserError: Source "truffle/Assert.sol" not found: ...
Read more >truffle/assert sol not found - Code Grepper
Running truffle test from the command line should import the Assert.sol library if truffle was installed globally (using npm install -g truffle). ......
Read more >Truffle test fails with Error: Could not find artifacts
sol"; vscode say: Source "truffle/Assert.sol" not found: File import callback not supported.My friend's version is 0.4.14 and work well, may be ...
Read more >Talk Crypto Blog » Where is DeployedAddresses.sol?
import "truffle/Assert.sol"; ... contracts/HelloWorld.sol"; ... truffle repo which can be found at usr/local/lib/node_modules/truffle.
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 FreeTop 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
Top GitHub Comments
I got the same problem here. And I am using Truffle v4.1.14 Solidity v0.4.24
Some answers say that using some older versions like Truffle v4.1.4 can be a solution, but after I try so, another error “ParserError: Expected identifier” shows up because the version of Solidity is too old.
I am using solidity ^0.7.0 and am receiving the same error. I will look for a work-around that doesn’t include reverting to an older compiler version.