1

I'm getting the following error on npm install:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for caniuse-lite@^1.0.30001349.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'browserslist'
npm ERR! notarget

caniuse-lite is not a dependency in package.json, so I tried to install it but I get:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for caniuse-lite@1.0.30001349.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

On https://www.npmjs.com/package/caniuse-lite web page, I see the 1.0.30001349 version is published few hours ago. Can it be a problem with last publishing of this library? Is there something I can do to solve the problem? I'm really stuck with developments...

Dragon981
  • 23
  • 3
  • Package update itself should not be a problem, the version increments third number which means this is a patch update. If package developers follow npm rules, then patch update should not break code. This package has quite a few downloads, so im pretty sure they do respect npm rules. Normally this error is thrown when you specify package version that does not exist but this is clearly not the case, have you tried `npm cache clean --force`? and then `install`. – tony Jun 07 '22 at 09:22
  • @tony yes I tried to clean and the reinstall but i get the same error. It seems strange there are no download in 4 hours... so I think there is a problem in last publish – Dragon981 Jun 07 '22 at 09:24
  • Not really recommended, but im afraid you will have to try removing package-lock.json – tony Jun 07 '22 at 09:28
  • I just downloaded the project from repository but the error blocks the npm install so package-lock.json isn't present. – Dragon981 Jun 07 '22 at 09:33
  • ok can you replace `^` prefix on version with `~` and try again? – tony Jun 07 '22 at 09:40
  • caniuse-lite is not in my package.json. I tried to install the 1.0.30001349 version but I get the second error. If I try to install with no version, the 1.0.30001346 is installed but on npm install I get the first error – Dragon981 Jun 07 '22 at 09:56

1 Answers1

0

As I supposed, after few hours npm install ends with no error. Maybe there was a problem with publishing of 1.0.30001349 version.

Dragon981
  • 23
  • 3