Closed toufic0710 closed 3 years ago
Hmm... do you have a .env
file with a mnemonic
in it?
Please do NOT send me the contents of that file, just whether or not it's there
Yes I have one, I filled it with my infura key, ethers can api key and private key.
Can you try re-cloning the repo and try again?
I did it an got this error :
I changed:
When I followed your tutorial I did not get that error.
If the svg contains double quotes, try replacing them with single quotes (')
Does that solve it?
Replacing with single quotes did not work. When you told me to download again the repo, I did some changes mentionned above, but I also deleted deployment files (except 01_deploy_svgnft), as I only wanted to run the first part of the tutorial. However, I redownload the repo without deleting anything and now it is working :)
I am also noticing this exact error. However I didn't clone the repo but I am manually doing each step with the tutorial. @PatrickAlphaC Not sure how to fix it.
yarn hardhat deploy --show-stack-traces
yarn run v1.22.19
warning package.json: No license field
$ /home/chinmay/dev/governance/node_modules/.bin/hardhat deploy --show-stack-traces
Nothing to compile
No need to generate any newer typings.
----------------------------------------------------
Deploying GovernanceToken and waiting for confirmations...
An unexpected error occurred:
Error: ERROR processing /home/chinmay/dev/governance/deploy/deploy-Governance-token.ts:
TypeError: Cannot read properties of undefined (reading 'length')
at getFrom (/home/chinmay/dev/governance/node_modules/hardhat-deploy/src/helpers.ts:1713:14)
at _deploy (/home/chinmay/dev/governance/node_modules/hardhat-deploy/src/helpers.ts:533:9)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async _deployOne (/home/chinmay/dev/governance/node_modules/hardhat-deploy/src/helpers.ts:1004:16)
at async Object.deployGovernanceToken [as func] (/home/chinmay/dev/governance/deploy/deploy-Governance-token.ts:14:27)
at async DeploymentsManager.executeDeployScripts (/home/chinmay/dev/governance/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1219:22)
at async DeploymentsManager.runDeploy (/home/chinmay/dev/governance/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1052:5)
at async SimpleTaskDefinition.action (/home/chinmay/dev/governance/node_modules/hardhat-deploy/src/index.ts:438:5)
at async Environment._runTaskDefinition (/home/chinmay/dev/governance/node_modules/hardhat/src/internal/core/runtime-environment.ts:219:14)
at async Environment.run (/home/chinmay/dev/governance/node_modules/hardhat/src/internal/core/runtime-environment.ts:131:14)
at DeploymentsManager.executeDeployScripts (/home/chinmay/dev/governance/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1222:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async DeploymentsManager.runDeploy (/home/chinmay/dev/governance/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1052:5)
at async SimpleTaskDefinition.action (/home/chinmay/dev/governance/node_modules/hardhat-deploy/src/index.ts:438:5)
at async Environment._runTaskDefinition (/home/chinmay/dev/governance/node_modules/hardhat/src/internal/core/runtime-environment.ts:219:14)
at async Environment.run (/home/chinmay/dev/governance/node_modules/hardhat/src/internal/core/runtime-environment.ts:131:14)
at async SimpleTaskDefinition.action (/home/chinmay/dev/governance/node_modules/hardhat-deploy/src/index.ts:584:32)
at async Environment._runTaskDefinition (/home/chinmay/dev/governance/node_modules/hardhat/src/internal/core/runtime-environment.ts:219:14)
at async Environment.run (/home/chinmay/dev/governance/node_modules/hardhat/src/internal/core/runtime-environment.ts:131:14)
at async SimpleTaskDefinition.action (/home/chinmay/dev/governance/node_modules/hardhat-deploy/src/index.ts:669:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@dexmorg9
const { deployer } = await getNamedAccounts();
I was missing await and getting this error. soon I put it , it got resolved.
I was missing the await key in getNamedAccounts()
const { deployer } = await getNamedAccounts()
const { deployer } = await getNamedAccounts();
I was missing await and getting this error. soon I put it , it got resolved.
Thank you!, it solved the issue.
Hi patrick,
I am following your tutorial and it is very instrictive. However, I face some troubles when I try to deploy the code to rinkeby (when I try to deploy it on a local network I do not have this issue) , I got the error "Cannot read property 'length' of undefined" and I am not able to find from where it comes from.
Here is the error :
Here is my hardhat.config.js file
Here is my 01_deploy_svgnft.js file:
tell me if you need any more file!