Skip to content

TypeError: Cannot read property 'length' of undefined #173

Answered by 0xrishavsharma
OIU2020 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there,
It is a GREAT question ⚡️

Can you please look into your config and confirm if "nameAccounts" property have the following values?
If it doesn't please paste them in your hardhat.config.js

namedAccounts: {
        deployer: {
            default: 0, // here this will by default take the first account as deployer
            1: 0, // similarly on mainnet it will take the first account as deployer. Note though that depending on how hardhat network are configured, the account 0 on one network can be different than on another
        },
    },

You can also checkout the answer to similar question at: #69
Let me know if this works or not 😊

If it doesn't works, please share the whole err…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@OIU2020
Comment options

Answer selected by OIU2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants