trufflesuite / truffle-migrate

On-chain migrations management
17 stars 17 forks source link

Error when deploying migrations 2 #33

Open ZoeGit18 opened 6 years ago

ZoeGit18 commented 6 years ago

Running migration: 2_deploy_contracts.js

/usr/local/lib/node_modules/truffle/build/cli.bundled.js:59973 throw new Error("Could not find artifacts for " + import_path + " from any sources"); ^ /usr/local/lib/node_modules/truffle/build/cli.bundled.js:59973 throw new Error("Could not find artifacts for " + import_path + " from any sources"); ^

Error: Could not find artifacts for ./Token from any sources at Resolver.require (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:59973:9) at Object.require (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:69602:36) at ResolverIntercept.require (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:197047:32) at /Users/Username/Token_sale/migrations/2_deploy_contracts.js:1:28 at ContextifyScript.Script.runInContext (vm.js:59:29) at ContextifyScript.Script.runInNewContext (vm.js:65:15) at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:101639:14 at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)

jjacquet commented 6 years ago

same issue. One thing I thought it was for me using openzepplin is the file path to the node modules. turn out not be the case

KingsonSingh commented 5 years ago

Your solidity file name should be same as contract name. Like in your case your file name is Token.sol and your contract name should be as- contract Token { }

johnsoncarl commented 5 years ago

Thanks for pointing out @KingsonSingh !

Though I still wonder, why this thing has to be like this.

johnsoncarl commented 5 years ago

The issue can be closed I guess!