question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Source "truffle/Assert.sol" not found

See original GitHub issue

While 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:closed
  • Created 5 years ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
vincentchenycommented, Sep 25, 2018

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.

0reactions
endepointecommented, Aug 12, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found