Cannot --update-db with Yarn on Windows
See original GitHub issueIt looks like the database updater is sensitive to line endings and, unfortunately for this project, Yarn on Windows has chosen to use Windows line endings:
PS REDACTED> yarn browserslist --update-db
yarn run v1.22.5
$ REDACTED\node_modules\.bin\browserslist --update-db
REDACTED\node_modules\browserslist\update-db.js:49
if (match[1]) return match[1]
^
TypeError: Cannot read property '1' of null
at getCurrentVersion (REDACTED\node_modules\browserslist\update-db.js:49:14)
at updateDB (REDACTED\node_modules\browserslist\update-db.js:119:17)
at Object.<anonymous> (REDACTED\node_modules\browserslist\cli.js:40:3)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
error Command failed with exit code 1.
If I re-save the yarn.lock
with LF instead of CRLF, it’s fine.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:20 (8 by maintainers)
Top Results From Across the Web
caniuse-lite is outdated. Please run next command `npm ...
I am using Yarn and I was able to correct this problem by removing only the caniuse-db and caniuse-lite entries in my yarn.lock...
Read more >yarn self-update
In order to update your version of Yarn, you can run one of the following commands: npm install --global yarn - if you've...
Read more >browserslist | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >browserslist - npm
The config to share target browsers and Node.js versions between different front-end tools. It is used in: ... Developers set their version lists ......
Read more >caniuse-lite is outdated. Please run: npx browserslist@latest
yarn ; yarn upgrade caniuse-lite browserlist; restart your server. If you still encounter the same issue, try clearing your browser cache.
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
Still broken for me
Still broken.