# Error installing truffle-upgrades

**URL:** <https://forum.openzeppelin.com/t/error-installing-truffle-upgrades/7243>\
**Category:** Upgrades\
**Created:** [April 22, 2021, 2:48pm UTC](https://forum.openzeppelin.com/t/error-installing-truffle-upgrades/7243 "2021-04-22T14:48:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuling\_Ma](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/yuling_ma/32/4276_2.png) [@Yuling\_Ma](https://forum.openzeppelin.com/u/Yuling_Ma)\
**Post date:** [April 22, 2021, 2:48pm UTC](https://forum.openzeppelin.com/t/error-installing-truffle-upgrades/7243/1 "2021-04-22T14:48:16Z")

</div>

I’m following [Upgradable Plugin doc](https://docs.openzeppelin.com/upgrades-plugins/1.x/) to install truffle-upgrades, and ran into the following errors -

```auto
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

```

**💻 Environment**

Truffle  
**📝Details**

**🔢 Code to reproduce**

npm install --save-dev @openzeppelin/truffle-upgrades

---

<div class="post-metadata">

**Author:** ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)\
**Post date:** [April 23, 2021, 1:32am UTC](https://forum.openzeppelin.com/t/error-installing-truffle-upgrades/7243/2 "2021-04-23T01:32:22Z")

</div>

Maybe you can delete all dependencies and try to install them again.

And I think you can also have a look at this tutorial:

- [OpenZeppelin Upgrades: Step by Step Tutorial for Truffle](https://forum.openzeppelin.com/t/openzeppelin-upgrades-step-by-step-tutorial-for-truffle/3579)

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [April 23, 2021, 4:06am UTC](https://forum.openzeppelin.com/t/error-installing-truffle-upgrades/7243/3 "2021-04-23T04:06:21Z")

</div>

Hi @Yuling_Ma,

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:

```auto
$ 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

```

```auto
$ node --version
v10.23.2

```

---

<div class="post-metadata">

**Author:** ![Lalaji](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/lalaji/32/6757_2.png) [@Lalaji](https://forum.openzeppelin.com/u/Lalaji)\
**Post date:** [September 5, 2021, 7:39am UTC](https://forum.openzeppelin.com/t/error-installing-truffle-upgrades/7243/4 "2021-09-05T07:39:41Z")

</div>

![20210905_130756](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/d/d484121cd78c41ff9e766bfaec338c7030666e05.jpeg)  
I have installed node js and Ganache but truffle is not installing this error is showing

---

<div class="post-metadata">

**Author:** ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)\
**Post date:** [September 5, 2021, 7:57am UTC](https://forum.openzeppelin.com/t/error-installing-truffle-upgrades/7243/5 "2021-09-05T07:57:56Z")

</div>

I think `-g` is a flag which means install in global scope, so the correct command should be:

```auto
npm install truffle -g 

```

---

<div class="post-metadata">

**Author:** ![Lalaji](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/lalaji/32/6757_2.png) [@Lalaji](https://forum.openzeppelin.com/u/Lalaji)\
**Post date:** [September 5, 2021, 8:00am UTC](https://forum.openzeppelin.com/t/error-installing-truffle-upgrades/7243/6 "2021-09-05T08:00:39Z")

</div>

![20210905_132852](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/c/cc5056eab691084033a02e942a862de7f0eb73ea.jpeg)  
I used I instead of g is it installed?  
But I check truffle version it shows this ![20210905_133508](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/a/a9b13db184357e8908cae22eb6e0101346ee4d7b.jpeg)  
This truffle file installed but why it don't shows when I check version

---

<div class="post-metadata">

**Author:** ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)\
**Post date:** [September 5, 2021, 8:08am UTC](https://forum.openzeppelin.com/t/error-installing-truffle-upgrades/7243/7 "2021-09-05T08:08:48Z")

</div>

Emmmm, maybe you can run the following command:

```auto
sudo npm install truffle -g

```
