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 23 in Blockchain by Saloni

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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) {



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

answered Jan 23 by Omkar
• 66,880 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,040 points
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,040 points
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
0 votes
1 answer
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 in Blockchain by John
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
• 66,880 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.