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,040 points
70 views

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

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
• 65,850 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 1, 2018 in Blockchain by Shashank
• 10,330 points
19 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
• 27,620 points
26 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
65 views
0 votes
1 answer
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 29, 2018 in Blockchain by Omkar
• 65,850 points
79 views
0 votes
2 answers

© 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.