I’m following Upgradable Plugin doc to install truffle-upgrades, and ran into the following errors -
npm install --save-dev @openzeppelin/truffle-upgrades
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: bignumber.js@7.2.1
npm ERR! node_modules/bignumber.js
npm ERR! bignumber.js@"^7.2.1" from @truffle/contract@4.3.13
npm ERR! node_modules/@truffle/contract
npm ERR! @truffle/contract@"^4.2.12" from @openzeppelin/truffle-upgrades@1.5.2
npm ERR! node_modules/@openzeppelin/truffle-upgrades
npm ERR! dev @openzeppelin/truffle-upgrades@"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional bignumber.js@"^9.0.1" from cbor@7.0.5
npm ERR! node_modules/cbor
npm ERR! cbor@"^7.0.0" from @openzeppelin/upgrades-core@1.6.0
npm ERR! node_modules/@openzeppelin/upgrades-core
npm ERR! @openzeppelin/upgrades-core@"^1.5.0" from @openzeppelin/truffle-upgrades@1.5.2
npm ERR! node_modules/@openzeppelin/truffle-upgrades
npm ERR! dev @openzeppelin/truffle-upgrades@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/cs603/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/cs603/.npm/_logs/2021-04-22T14_17_46_149Z-debug.log
Please first install Truffle (npm install truffle) before installing the Truffle Upgrades Plugin.
I was able to get the same error as you if I installed Truffle Upgrades Plugin in an empty project:
$ npm install --save-dev @openzeppelin/truffle-upgrades
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: bignumber.js@7.2.1
npm ERR! node_modules/bignumber.js
npm ERR! bignumber.js@"^7.2.1" from @truffle/contract@4.3.13
npm ERR! node_modules/@truffle/contract
npm ERR! @truffle/contract@"^4.2.12" from @openzeppelin/truffle-upgrades@1.5.2
npm ERR! node_modules/@openzeppelin/truffle-upgrades
npm ERR! dev @openzeppelin/truffle-upgrades@"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional bignumber.js@"^9.0.1" from cbor@7.0.5
npm ERR! node_modules/cbor
npm ERR! cbor@"^7.0.0" from @openzeppelin/upgrades-core@1.6.0
npm ERR! node_modules/@openzeppelin/upgrades-core
npm ERR! @openzeppelin/upgrades-core@"^1.5.0" from @openzeppelin/truffle-upgrades@1.5.2
npm ERR! node_modules/@openzeppelin/truffle-upgrades
npm ERR! dev @openzeppelin/truffle-upgrades@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/abcoathup/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/abcoathup/.npm/_logs/2021-04-23T04_04_15_323Z-debug.log