Truffle can not find artifacts error

0 votes

I have written a smart contract and try to run it using truffle. When I try to migrate the project, I am getting the following error:

Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: Could not find artifacts for ./Migrations.sol from any sources at Resolver.require (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:69108:9)

Please help.

Jan 24, 2019 in Blockchain by Saloni
4,903 views

1 answer to this question.

0 votes

To deploy any project/ smart contract, you need Migrations.sol. You can not migrate/ deploy without that. If you have run truffle init, you will have a default file. If not, you have to create this file under contracts directory with the following content:

var Adoption = artifacts.require("MyToken.sol");

module.exports = function(deployer) {

    deployer.deploy(Adoption);

};

Replace require field with the name of contract you have used. 

answered Jan 24, 2019 by Omkar
• 69,220 points

Related Questions In Blockchain

+1 vote
5 answers

How to solve "truffle: command not found" error in blockchain?

First try restarting the system and then ...READ MORE

answered Jul 16, 2018 in Blockchain by slayer
• 29,370 points
11,947 views
0 votes
1 answer

Truffle tutorials "Error:recipient address is not a contract address"

It appears like you have already migrated ...READ MORE

answered Aug 8, 2018 in Blockchain by slayer
• 29,370 points
1,133 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,923 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
0 votes
1 answer
0 votes
2 answers

Truffle console error: Could not find suitable configuration file

First, initialize truffle project by running: $ truffle ...READ MORE

answered Feb 19, 2019 in Blockchain by John
13,872 views
0 votes
1 answer

Truffle init: Error: Cannot find module 'original-require'

I think you need to run this ...READ MORE

answered Oct 24, 2018 in Blockchain by Omkar
• 69,220 points
1,924 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP