npx browserslist@latest --update-db does not work with yarn workspaces
See original GitHub issueRunning npx browserslist@latest --update-db
in the project root:
npx: installed 5 in 1.579s
Current version: 1.0.30001154
New version: 1.0.30001154
Removing old caniuse-lite from lock file
Installing new caniuse-lite version
$ yarn add caniuse-lite
error Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you want - if you really meant it, make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).
Error: Command failed: yarn add caniuse-lite
error Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you want - if you really meant it, make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).
Running npx browserslist@latest --update-db
inside a workspace:
npx: installed 5 in 1.576s
No lockfile found. Run "npm install", "yarn install" or "pnpm install"
Workaround
Note: this isn’t necessary anymore after https://github.com/browserslist/browserslist/pull/553
- Run
npx browserslist@latest --update-db
in the project root, let it fail - Run
yarn add caniuse-lite && yarn remove caniuse-lite
inside the workspace
Issue Analytics
- State:
- Created 3 years ago
- Reactions:19
- Comments:7 (5 by maintainers)
Top Results From Across the Web
npx browserslist@latest --update-db does not work with yarn ...
Running npx browserslist@latest --update-db in the project root: npx: installed 5 in 1.579s Current version: 1.0.30001154 New version: ...
Read more >caniuse-lite is outdated. Please run next command `npm ...
Try this it solved my problem npx browserslist@latest --update-db ... caniuse-db and caniuse-lite entries in my yarn.lock and doing a yarn .
Read more >browserslist | Yarn - Package Manager
The config to share target browsers and Node.js versions between different front-end tools. It is used in:.
Read more >Caniuse-lite is outdade, please run `npx browserslist@latest
While running commands in an NX workspace, this warning kept popping up so I tried to fix it by running the specified command....
Read more >lerna-debug.log · master · wax / wax-prosemirror - Coko GitLab
12 error Browserslist: caniuse-lite is outdated. Please run: 23. 12 error npx browserslist@latest --update-db.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding
-W
doesn’t break if you’re not inside a workspace. Just tested it:The fix was released in 4.14.7