Every time I try to install packages using npm install
, I'm getting npm ERR! Tracker "idealTree:inflate:" already exists
error.
I've tried removing node_modules
and clearing cache, but no luck for me.
I had the same issue when trying to update a v1 lockfile to v2 with npmv7, as it seems to be the case in your codebase, and the only way to make it work was to delete the lockfile, clear the cache and do a npm i
again with the --prefer-dedupe flag.
With the package-lock rebuilt, npm i
with no flag worked again, as did npm ci
.
Before that, I tried npm i --legacy-peer-deps
as it seemed to mimic npm v6 not installing peer dependencies and it failed too, however I think it's interesting to know this flag exists, check out the npm 7 announcement page for more clues : https://github.blog/2021-02-02-npm-7-is-now-generally-available/#peer-dependencies
TLDR
rm package-lock.json
npm cache clear --force
npm i --prefer-dedupe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With