Truffle package zeppelin-solidity isn't found
See original GitHub issueHello!
I’m trying to generate coverage for this project https://github.com/mixbytes/storiqa_ico/tree/036a57a6c71599b643145f4ec4e77d86b360dec1.
and encountering an error
$ ./node_modules/.bin/solidity-coverage
Generating coverage environment
Instrumenting ./coverageEnv/contracts/crowdsale/FixedTimeBonuses.sol
Instrumenting ./coverageEnv/contracts/crowdsale/FundsRegistry.sol
Skipping instrumentation of ./coverageEnv/contracts/Migrations.sol
Instrumenting ./coverageEnv/contracts/ownership/multiowned.sol
Instrumenting ./coverageEnv/contracts/ownership/MultiownedControlled.sol
Instrumenting ./coverageEnv/contracts/ownership/SimpleMultiSigWallet.sol
Instrumenting ./coverageEnv/contracts/STQCrowdsale.sol
Instrumenting ./coverageEnv/contracts/STQToken.sol
Instrumenting ./coverageEnv/contracts/test_helpers/crowdsale/FundsRegistryTestHelper.sol
Instrumenting ./coverageEnv/contracts/test_helpers/STQCrowdsaleTestHelper.sol
Instrumenting ./coverageEnv/contracts/test_helpers/token/MintableMultiownedTokenTestHelper.sol
Instrumenting ./coverageEnv/contracts/token/CirculatingToken.sol
Instrumenting ./coverageEnv/contracts/token/MintableMultiownedToken.sol
Launched testrpc on port 8555
Running: truffle test
(this can take a few seconds)...
Using network 'development'.
Error: Could not find zeppelin-solidity/contracts/ReentrancyGuard.sol from any sources; imported from /home/e/storiqa_ico/coverageEnv/contracts/STQCrowdsale.sol
at /home/e/storiqa_ico/node_modules/truffle/build/cli.bundled.js:49111:23
at /home/e/storiqa_ico/node_modules/truffle/build/cli.bundled.js:60660:16
at next (/home/e/storiqa_ico/node_modules/truffle/build/cli.bundled.js:69109:18)
at /home/e/storiqa_ico/node_modules/truffle/build/cli.bundled.js:49099:7
at /home/e/storiqa_ico/node_modules/truffle/build/cli.bundled.js:96498:5
at /home/e/storiqa_ico/node_modules/truffle/build/cli.bundled.js:69014:16
at replenish (/home/e/storiqa_ico/node_modules/truffle/build/cli.bundled.js:60630:25)
at iterateeCallback (/home/e/storiqa_ico/node_modules/truffle/build/cli.bundled.js:60620:17)
at /home/e/storiqa_ico/node_modules/truffle/build/cli.bundled.js:60660:16
at ReadFileContext.callback (/home/e/storiqa_ico/node_modules/truffle/build/cli.bundled.js:96494:14)
Cleaning up...
zeppelin-solidity is used in the project as a package as described in truffle docs and installed locally in /home/e/storiqa_ico/node_modules/zeppelin-solidity/. Truffle does’t have any problems searching for zeppelin-solidity includes when invoked from the project root directory.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
truffle compile error: could not find zeppelin-solidity/contracts
I can see zeppelin-solidity in the /usr/local/lib/node_modules on my mac. I created project with truffle init , but in one of my contracts,...
Read more >Truffle compiler can't find open zeppelin contracts
I get an error message when I try to compile. I checked inside node_modules and all the contracts are there. im running truffle...
Read more >Truffle compiler error: Requested contract not found - Support
Hi everyone, I am trying to do some really simple compile and deploy with truffle but run into this error: Error: The requested...
Read more >“ParserError: Source “openzeppelin/contracts/token/*.sol” not ...
Therefore, truffle cannot locate the @openzeppelin/contracts package. To solve this, run the npm init command in the directory containing the node_modules ...
Read more >Open Zeppelin (TutorialToken) tutorial - Truffle Suite
The most recent version of OpenZeppelin can be found as an npm package. npm install openzeppelin-solidity. Creating the "TutorialToken" smart contract¶. With ...
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 found this easily via google and thought it makes sense to post what needs to be added to .solcover.js to make it clear to everyone
It is also possible to add the specific package like this
Hi @Eenae. If you are importing contracts from npm into your solidity files you can explicitly request that
node_modules
is included in the coverage environment by creating a.solcover.js
config file and setting thecopyNodeModules
option to true. See the README for more details.Thanks for opening this - I think it will be helpful to anyone using Zeppelin base contracts to have this in the issues history.
Closing because it’s addressed by the existing docs. Please feel free to reopen if you continue to run into problems with this.