0

The project is working on a Mac. Cloned from git on an Ubuntu machine while running truffle migrate it fails with: Error: Could not find artifacts for ./mycontract from any sources. Contract file of course exists, and code is working on the other box. What am I missing?

3

Try this: artifacts.require('MyContract').

Don't use the file name of the contract, use actual the name of the contract. artifacts.require uses the JSON files in [project root]/build/contracts, which are named after the contract's name, not it's file's name

  • great! it works, it will be nice to know why it does anyway on mac ... – Felice Pollano May 16 '18 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.