Hi,
I'm using pnpm and trying to update my browserslist db. I tried running $ pnpm dlx update-browserslist-db but it throws an error because it tries to run npm at some point:
/home/myuser/.local/share/pnpm/store/v3/tmp/dlx-415634/node_modules/.pnpm/update-browserslist-db@1.0.9/node_modules/update-browserslist-db/cli.js:39
throw e
^
Error: Command failed: npm show caniuse-lite --json
at checkExecSyncError (node:child_process:871:11)
at Object.execSync (node:child_process:943:15)
at getLatestInfo (/home/jmasson/.local/share/pnpm/store/v3/tmp/dlx-415634/node_modules/.pnpm/update-browserslist-db@1.0.9/node_modules/update-browserslist-db/index.js:72:18)
at updateDB (/home/jmasson/.local/share/pnpm/store/v3/tmp/dlx-415634/node_modules/.pnpm/update-browserslist-db@1.0.9/node_modules/update-browserslist-db/index.js:259:16)
at Object.<anonymous> (/home/jmasson/.local/share/pnpm/store/v3/tmp/dlx-415634/node_modules/.pnpm/update-browserslist-db@1.0.9/node_modules/update-browserslist-db/cli.js:34:5)
at Module._compile (node:internal/modules/cjs/loader:1119:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
at Module.load (node:internal/modules/cjs/loader:997:32)
at Module._load (node:internal/modules/cjs/loader:838:12)
I don't have npm installed which explains why the command fails.
From quickly reading the code it looks like this command has a yarn version but not a pnpm one. Is there a workaround to this issue ?
Hi, I'm using
pnpm
and trying to update my browserslist db. I tried running$ pnpm dlx update-browserslist-db
but it throws an error because it tries to runnpm
at some point:I don't have
npm
installed which explains why the command fails. From quickly reading the code it looks like this command has ayarn
version but not apnpm
one. Is there a workaround to this issue ?https://github.com/browserslist/update-db/blob/dd50e379d141a0bf4c259a2bc07d3bc1e68705f7/index.js#L59-L72