Truffle migrate Error You must specify a network id in your development configuration in order to use this network

0 votes

When I run 

truffle migrate --reset

I am getting this error:

Error: You must specify a network_id in your 'development' configuration in order to use this network.

    at Object.detect (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/environment.js:43:1)

    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/commands/migrate.js:91:1

    at finished (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-workflow-compile/index.js:53:1)

    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-compile/index.js:314:1

    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-compile/profiler.js:158:1

    at /usr/local/lib/node_modules/truffle/build/webpack:/~/async/dist/async.js:3888:1

    at /usr/local/lib/node_modules/truffle/build/webpack:/~/async/dist/async.js:473:1

    at replenish (/usr/local/lib/node_modules/truffle/build/webpack:/~/async/dist/async.js:1006:1)

    at iterateeCallback (/usr/local/lib/node_modules/truffle/build/webpack:/~/async/dist/async.js:995:1)

    at /usr/local/lib/node_modules/truffle/build/webpack:/~/async/dist/async.js:969:1

    at /usr/local/lib/node_modules/truffle/build/webpack:/~/async/dist/async.js:3885:1

    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-compile/profiler.js:154:1

    at /usr/local/lib/node_modules/truffle/build/webpack:/~/async/dist/async.js:1140:1

    at /usr/local/lib/node_modules/truffle/build/webpack:/~/async/dist/async.js:473:1

    at iteratorCallback (/usr/local/lib/node_modules/truffle/build/webpack:/~/async/dist/async.js:1064:1)

    at /usr/local/lib/node_modules/truffle/build/webpack:/~/async/dist/async.js:969:1

    at /usr/local/lib/node_modules/truffle/build/webpack:/~/async/dist/async.js:1137:1

    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-compile/profiler.js:133:1

    at FSReqWrap.oncomplete (fs.js:153:5)
Dec 11, 2018 in Blockchain by slayer
• 29,370 points
8,112 views

1 answer to this question.

0 votes

You have to mention the network id in truffle.js file. If you are not aware of your network id or/and you want to join any network, then you mention the property like:

network_id: '*'

This will match to any network id available.

answered Dec 11, 2018 by Omkar
• 69,220 points

Related Questions In Blockchain

0 votes
1 answer
0 votes
1 answer

What could be the best term to use for the collection of contracts in a .sol file?

module - don't think so. Because module ...READ MORE

answered Jun 2, 2018 in Blockchain by Shashank
• 10,400 points
722 views
0 votes
1 answer

How i can use nodejs to watch transactions in bitcoin network?

you can use  const Socket = require('blockchain.info/Socket'); const mySocket ...READ MORE

answered Jul 9, 2018 in Blockchain by digger
• 26,740 points
1,275 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,916 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,446 views
0 votes
1 answer
0 votes
1 answer

Not able to migrate contract in Truffle: Error: No network specified. Cannot determine current network

Make these entries in truffle.js file: module.exports = { ...READ MORE

answered Nov 30, 2018 in Blockchain by Omkar
• 69,220 points
1,171 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,560 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