我在尝试在安全帽开发链上部署模拟合约时收到以下错误。
\n我正在关注:
\n\n\n使用 JavaScript 学习区块链、Solidity 和全栈 Web3 开发 \xe2\x80\x93 由 Patrick Collins 在 FreeCodeCamp YT 频道上提供的 32 小时课程
\n
我在上述课程的 10:48:53 时收到此错误。我几乎尝试了所有方法,但没有任何帮助,但我找到了问题发生的地方。
\n问题:我认为问题出在哪里?(12:26)
\n\n\n据我所知,问题出在我们尝试部署脚本并等待返回承诺的行。
\n
这是错误:
\nError: ERROR processing /Users/rishavsharma/Documents/working/Web Dev/Blockchain/Freecodecamp/solidity&Block/blockchain-with-js/buyMeACoffee-dapp/deploy/00-deploy-mocks.js:\nTypeError: Cannot read property \'length\' of undefined\n at getFrom (/Users/rishavsharma/Documents/working/Web Dev/Blockchain/Freecodecamp/solidity&Block/blockchain-with-js/buyMeACoffee-dapp/node_modules/hardhat-deploy/src/helpers.ts:1713:14)\n at _deploy (/Users/rishavsharma/Documents/working/Web Dev/Blockchain/Freecodecamp/solidity&Block/blockchain-with-js/buyMeACoffee-dapp/node_modules/hardhat-deploy/src/helpers.ts:533:9)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at _deployOne (/Users/rishavsharma/Documents/working/Web Dev/Blockchain/Freecodecamp/solidity&Block/blockchain-with-js/buyMeACoffee-dapp/node_modules/hardhat-deploy/src/helpers.ts:1004:16)\n at Object.module.exports [as func] (/Users/rishavsharma/Documents/working/Web Dev/Blockchain/Freecodecamp/solidity&Block/blockchain-with-js/buyMeACoffee-dapp/deploy/00-deploy-mocks.js:12:26)\n at DeploymentsManager.executeDeployScripts (/Users/rishavsharma/Documents/working/Web Dev/Blockchain/Freecodecamp/solidity&Block/blockchain-with-js/buyMeACoffee-dapp/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1219:22)\n at DeploymentsManager.runDeploy (/Users/rishavsharma/Documents/working/Web Dev/Blockchain/Freecodecamp/solidity&Block/blockchain-with-js/buyMeACoffee-dapp/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1052:5)\n at SimpleTaskDefinition.action (/Users/rishavsharma/Documents/working/Web Dev/Blockchain/Freecodecamp/solidity&Block/blockchain-with-js/buyMeACoffee-dapp/node_modules/hardhat-deploy/src/index.ts:438:5)\n at …
Run Code Online (Sandbox Code Playgroud)