Truffle Migrations ran out of gas error

0 votes

When I run truffle migrate command, I am getting this error:

1_initial_migration.js
======================
   Deploying 'Migrations'
   ----------------------
Error:  *** Deployment Failed ***
"Migrations" ran out of gas (using a value you set in your network config or deployment parameters.)
   * Block limit:  2582365
   * Gas sent:     20000
    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
Jan 17, 2019 in Blockchain by slayer
• 29,370 points
4,075 views

1 answer to this question.

–1 vote

This error is caused because the amount of gas you have used is not enough to deploy/migrate the contract. Try increasing the gas amount in the truffle.js and then try to migrate. It will work

answered Jan 17, 2019 by Omkar
• 69,220 points
How do we increase the amount of gas?

Related Questions In Blockchain

0 votes
0 answers

Migrations ran out of gas

I have unboxed pet-shop. Then inside the ...READ MORE

Jun 25, 2019 in Blockchain by anonymous
1,096 views
+1 vote
4 answers

Uncaught Error: Returned values aren't valid, did it run Out of Gas?

Could be due to previously set values. ...READ MORE

answered Jan 31, 2019 in Blockchain by Omkar
• 69,220 points
8,301 views
0 votes
1 answer

Truffle Error: Migrations contract constructor expected

You are not using constructor() public { ...READ MORE

answered Aug 10, 2018 in Blockchain by digger
• 26,740 points
1,613 views
0 votes
1 answer

Ethereum truffle MetaCoin : 'intrinsic gas too low' error

Change the genesis block gasLimit to "gasLimit": "0x2FEFD800", config ...READ MORE

answered Oct 22, 2018 in Blockchain by Omkar
• 69,220 points
1,318 views
+3 votes
1 answer

When I ran truffle init, I got this error:

Hey there @Davidala! The error says that it ...READ MORE

answered Oct 29, 2018 in Blockchain by Omkar
• 69,220 points
788 views
0 votes
1 answer

What if Gas required in my program exceeds the limit of 3000000?

Going through your code, I noticed that  you ...READ MORE

answered May 29, 2018 in Blockchain by Perry
• 17,100 points
809 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,928 views
0 votes
1 answer

Solidity geth: Error encountered during contract execution [Bad instruction]

recipes is a dynamic storage array. You need ...READ MORE

answered Oct 15, 2018 in Blockchain by Omkar
• 69,220 points
1,468 views
0 votes
2 answers

Why is network already up to date while trying to deploy a contract on truffle?

I guess you have ganache running already ...READ MORE

answered Apr 24, 2018 in Blockchain by Shashank
• 10,400 points
4,573 views
0 votes
1 answer

How can I deploy a HelloWorld contract on my testrpc network?

The problem lies in the command: truffle migrate Your truffle migrate command ...READ MORE

answered Apr 27, 2018 in Blockchain by Perry
• 17,100 points

edited Aug 10, 2018 by Omkar 2,850 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