TypeError: Cannot read property 'errors' of undefined
See original GitHub issueI have used the @openzeppelin/truffle-upgrades@1.5.0 without the package @openzeppelin/upgrades-core when I deploy an upgradable contract some weeks ago。I create a new project with my contracts code and take this errors:
TypeError: Cannot read property 'errors' of undefined
at /Users/work/allan/node_modules/@openzeppelin/truffle-upgrades/node_modules/@openzeppelin/upgrades-core/src/validate/query.ts:109:58
at Array.map (<anonymous>)
at getErrors (/Users/work/allan/node_modules/@openzeppelin/truffle-upgrades/node_modules/@openzeppelin/upgrades-core/src/validate/query.ts:109:26)
at Object.assertUpgradeSafe (/Users/work/allan/node_modules/@openzeppelin/truffle-upgrades/node_modules/@openzeppelin/upgrades-core/src/validate/query.ts:13:16)
at deployProxy (/Users/work/allan/node_modules/@openzeppelin/truffle-upgrades/src/deploy-proxy.ts:49:3)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at module.exports (/Users/work/allan/migrations/10_mdxpool_deploy.js:8:24)
at Migration._deploy (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:80:1)
at Migration._load (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:61:1)
at Migration.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:218:1)
at Object.runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1)
at Object.runFrom (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
at runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:253:1)
at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:223:1)
at Command.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/command.js:147:1)
I have change all the packets to the same version with my old project ,but still occured the same error? how Can I do not use this @openzeppelin/upgrades-core packages? OR fix this errors? Thank you
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
[SOLVED] Cannot Read Property of Undefined in JavaScript
The “cannot read property of undefined” error occurs when you attempt to access a property or method of a variable that is undefined...
Read more >Cannot read property 'errors' of undefined in angular 2
I am validating my template using angular2, but meanwhile it shows this error: Cannot read the ...
Read more >Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >[Solved] Cannot read Properties of Undefined in JavaScript
The "Cannot read properties of undefined" error occurs when you try to access a property or a method on a variable that stores...
Read more >Fix: “Cannot Read Property of Undefined” Error in JavaScript
To fix the “cannot read property of undefined” error, use the optional chaining operator on the variable before accessing a property. If the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Note that you are not using the latest version of the upgrades plugin. Version are backward compatible, and include a manifest migration mechanism.
I would encourage you to save a backup of your
.openzeppelin
folder, upgrade to the latest version of the plugin (@openzeppelin/truffle-upgrades:1.7.0
) and see it that fixes anything.I think that is my contracts’s problem. I have to try it. tks