Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browserlist update does nothing #724

Open
marco-eckstein opened this issue Sep 2, 2022 · 3 comments
Open

Browserlist update does nothing #724

marco-eckstein opened this issue Sep 2, 2022 · 3 comments

Comments

@marco-eckstein
Copy link

In our Create React App, the node_modules\caniuse-lite\package.json has version 1.0.30001251. yarn build tells me that

Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db

But when I do this, the version in node_modules\caniuse-lite\package.json stays the same, and yarn build will request to run the browserlist update again. Our project's package.json and yarn.lock are unchanged. This is the output of npx browserslist@latest --update-db:

Latest version:     1.0.30001384
Installed version:  none
Removing old caniuse-lite from lock file
Installing new caniuse-lite version
$ yarn add -W caniuse-lite

# (Warnings about peer dependencies...)

Cleaning package.json dependencies from caniuse-lite
$ yarn remove -W caniuse-lite

# (Warnings about peer dependencies...)

caniuse-lite has been successfully updated

No target browser changes

Also posted at Stack Overflow.

@ai
Copy link
Member

ai commented Sep 2, 2022

  1. Can you show the project’s source code? Maybe at least package.json?
  2. What OS do you use?

@stephane303
Copy link

stephane303 commented Oct 11, 2022

I had the same issue.
To fix it I manually removed all references to caniuse-lite in yarn.lock and then executed
npx browserslist@latest --update-db
yarn.zip

it seems the part "Removing old caniuse-lite from lock file" is not working
You'll find attached package.json and yarn.lock
OS: Windows 11
Node Version : v16.14.2

@marco-eckstein
Copy link
Author

marco-eckstein commented Aug 23, 2023

  1. Can you show the project’s source code? Maybe at least package.json?

Unfortunately no.

  1. What OS do you use?

Windows 10.

I ended up enforcing a recent caniuse-lite version by adding this to my package.json:

"resolutions": {
  "caniuse-lite": "1.0.30001522",
},

The message about caniuse-lite being outdated has disappeared since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants