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

Error: None of the sub-resolvers resolved "@openzeppelin/contracts/access/Ownable.sol" location. #54

Closed
naszam opened this issue May 14, 2020 · 6 comments

Comments

@naszam
Copy link

naszam commented May 14, 2020

Hi,
I'm trying to use truffle-flattener v1.4.4 to flatten my truffle project contracts, but I'm getting the following error:

Error: None of the sub-resolvers resolved "@openzeppelin/contracts/access/Ownable.sol" location.

when trying the following:

$ truffle-flattener MyContract.sol > FlattenMyContract.sol

Using the following dependences:
Ubuntu 18.04
npm v13.13.0
truffle v5.1.25
solc v0.6.7

@frangio
Copy link
Contributor

frangio commented May 19, 2020

Hi @naszam. I wasn't able to reproduce your issue.

Does your contract compile successfully using truffle compile? What version of @openzeppelin/contracts are you using?

@naszam
Copy link
Author

naszam commented May 19, 2020

Hi @frangio.

Yep!
OpenZeppelin v3.0.1 (latest)

@frangio
Copy link
Contributor

frangio commented May 20, 2020

If you want to upload your project somewhere I can take a look, otherwise I don't know what could be causing this.

@naszam
Copy link
Author

naszam commented May 20, 2020

I've fixed it!
So, the issue was that I was using truffle-flattener as global dependency and not locally.
Installing both OpenZeppelin and truffle-flattener locally, I managed to get it working.
Thanks!

@alcuadrado
Copy link
Member

Closing to clean up the repository. If this problem persists, please open a new issue with a clear explanation.

@ryanjsfx2424
Copy link

Why in the world should this be an issue with OpenZeppelin and truffle-flattener globally installed?

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

4 participants