Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find contracts imported from node_modules #152

Closed
davesag opened this issue Nov 16, 2017 · 2 comments
Closed

Can't find contracts imported from node_modules #152

davesag opened this issue Nov 16, 2017 · 2 comments

Comments

@davesag
Copy link

davesag commented Nov 16, 2017

I'm using Truffle 4.0.1

Some of my contracts import 'zeppelin-solidity/contracts/token/ERC20.sol'

  • Running my tests from within truffle develop is just fine.
  • Running my tests by running up my own testrpc and running truffle test runs just fine.

Running solidity-coverage however fails.

Error: Could not find zeppelin-solidity/contracts/token/ERC20.sol from any sources; imported from /Users/davesag/src/myawesomeproject/coverageEnv/contracts/Escrow.sol
@area
Copy link
Contributor

area commented Nov 16, 2017

You need to set the copyNodeModules flag to true in your config. This will increase runtime; if we can get #117 working everywhere, then you would be able to specify just the zeppelin contracts, but that's not possible for now.

@davesag
Copy link
Author

davesag commented Nov 16, 2017

Cool that worked kind-of. I've raised a separate issue, #153 for the error I am now getting.

@davesag davesag closed this as completed Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants