Visual Studio Code Truffle Error Message "You must specify a network_id in your 'base' configuration in order to use this network." #123958
Unanswered
dom0123
asked this question in
Programming Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
I have currently been working on a small project using Visual Studio Code with truffle. I have tried everything to troubleshoot but I keep running into the following message when going running "truffle migrate --network base" it shows "Error: You must specify a network_id in your 'base' configuration in order to use this network."
I have tried to running visual studio on a new computer with a clean slate and I still get the same error. I have verified the network RPC URL as well as the network ID. I just don't understand why this error keeps coming up. Besides from that error everything complies as should correctly. I would appreciate any help on the matter thank you!
`require('dotenv').config();
const HDWalletProvider = require('@truffle/hdwallet-provider');
const privateKey = process.env.PRIVATE_KEY;
module.exports = {
networks: {
base: {
provider: () => new HDWalletProvider({
privateKeys: [privateKey], // Array of account private keys
providerOrUrl: 'https://mainnet.base.org'
}),
network_id: 8453,
gas: 5500000,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true //
},
},`
Beta Was this translation helpful? Give feedback.
All reactions