Browserslist update with rush and pnpm doesn't work
See original GitHub issueI use rush to manage a big monorepo. It has many subprojects. Rush stores no individual lock file and instead keeps one big lock file in a central location.
While building with rush my subprojects output the following error:
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
When I cd into a subproject and run pnpx browserslist@latest --update-db
it crashes with the following error:
No lockfile found. Run "npm install", "yarn install" or "pnpm install"
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Rushstack CI blocked by "browerslist update" warning #2981
It's not super clear how to fix this warning, running the suggested command in one of the affected projects doesn't work because there's...
Read more >caniuse-lite is outdated. Please run next command `npm ...
First, as the message says, I ran npm update caniuse-lite browserslist but it didn't fix the issue. I deleted the whole node_modules directory ......
Read more >rushstack/rushstack - Gitter
Hi! Our monorepo has a bunch of different apps, and all apps currently have their own pipelines that trigger if e.g. apps/my-app/* changed....
Read more >browserslist - Bountysource
When using Yarn v2, running npx browserslist@latest --update-db fails with the error Cannot read property '1' of null . Calling yarn run browserslist ......
Read more >Build a scalable front-end with Rush monorepo and React
Run rush update to install all dependencies and let's try to build ... to use browserslist from package.json from @monorepo/react-scripts .
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
I made a script to bump only caniuse-lite (since
rush update --full
is a rather disruptive operation just for this package to be updated).Here is a script that I made. Make sure it exists under
scripts/
in your monorepo, since I hard-coded paths to navigate to root from there (or you can just alter the code).https://gist.github.com/wbern/1f560e2ea3fc7093743c8107a0e105e2
You can just write a
.pnpmfile.cjs readPackage hook
, and runrush update --recheck
; As @wbern mentioned,rush update --full
is a rather disruptive operation just for this package to be updated