Repository navigation
Closed as not planned
Description
I tried publishing my extension but recently switched to use pnpm instead of npm. vsce seems to not support this package manager (does yarn even works, very similar to pnpm) since it tries to do npm list --production --parseable --depth=99999 which fails in pnpm projects because of the different handling of dependencies.
Error:
❯ npm list --production --parseable --depth=99999
/Users/marvinheilemann/Development/VSCode/vscode-sundial
/Users/marvinheilemann/Development/VSCode/vscode-sundial/node_modules/dayjs
/Users/marvinheilemann/Development/VSCode/vscode-sundial/node_modules/got
/Users/marvinheilemann/Development/VSCode/vscode-sundial/node_modules/public-ip
/Users/marvinheilemann/Development/VSCode/vscode-sundial/node_modules/suncalc
npm ERR! missing: @sindresorhus/is@^1.0.0, required by [email protected]
npm ERR! missing: @szmarczak/http-timer@^4.0.0, required by [email protected]
npm ERR! missing: @types/cacheable-request@^6.0.1, required by [email protected]
npm ERR! missing: cacheable-lookup@^2.0.0, required by [email protected]
npm ERR! missing: cacheable-request@^7.0.1, required by [email protected]
npm ERR! missing: decompress-response@^5.0.0, required by [email protected]
npm ERR! missing: duplexer3@^0.1.4, required by [email protected]
npm ERR! missing: get-stream@^5.0.0, required by [email protected]
npm ERR! missing: lowercase-keys@^2.0.0, required by [email protected]
npm ERR! missing: mimic-response@^2.0.0, required by [email protected]
npm ERR! missing: p-cancelable@^2.0.0, required by [email protected]
npm ERR! missing: p-event@^4.0.0, required by [email protected]
npm ERR! missing: responselike@^2.0.0, required by [email protected]
npm ERR! missing: to-readable-stream@^2.0.0, required by [email protected]
npm ERR! missing: type-fest@^0.9.0, required by [email protected]
npm ERR! missing: dns-socket@^4.2.0, required by [email protected]
npm ERR! missing: got@^9.6.0, required by [email protected]
npm ERR! missing: is-ip@^3.1.0, required by [email protected]
Reacted by michkot, alset0326, Jack Works, Nate Moore, rafik, Markus Zimmermann, Lou Cyx, Sadir, Sam Pullman, Alexander and 98 more
Reacted by rafik, Alexander, Theo Paris, Maximiliano Redigonda, Jegor Zalenski, Felix Häberle, Jasen Qin, Shashwat jaiswal, _Kerman, Oscar A. B. Orellana and 1 more
Metadata
Metadata
Assignees
Labels
No labels
Activity
muuvmuuv commentedon Feb 11, 2020
Equivalent command would be:
pnpm list --prod --json(yarnuses the same)muuvmuuv commentedon Feb 11, 2020
I guess this requires some rework of the npm.ts script. There is a package that checks which pm was used, maybe something to consider: https://github.com/zkochan/packages/tree/master/which-pm
empathicqubit commentedon Sep 5, 2020
I've been looking at how to make this work. The main issue is that pnpm makes heavy use of symlinks which won't work with the vsix compression, which is just PKZIP.
I've been able to get it to fully work with
pnpm install --shamefully-hoist, but that seems less than ideal.Jack-Works commentedon Mar 13, 2021
Having this problem too. I don't want to mix many package managers in a single project
theoparis commentedon Apr 30, 2021
I just ended up using yarn for my vscode extension, while using pnpm for everything else. Hopefully this will be solved soon.
loucyx commentedon Jun 12, 2021
vsceshould be package manager agnostic. Having it usingnpminstead of using whatever the dev has is far from ideal. I had to usenpmwhen I usepnpmfor everything else:This worked on previous versions of
vsce, so the change mush be kinda recent.muuvmuuv commentedon Sep 25, 2021
Oh... I just forgot about my issue about that last year and switched to pnpm again with the same extension xD
Can this get more attention please, since Node allows to have any pm to be the default: https://pnpm.io/installation#nodejs-is-preinstalled
I really don't want to use npm just for one project which would also mean I must remove my
alias npm=pnpmline in zshrc :Dsoftboy99 commentedon Sep 30, 2021
+1
tjx666 commentedon Oct 7, 2021
Use pnpm occur problem:
idleberg commentedon Nov 22, 2021
In the longterm it should probably use
corepack, which was designed for this case:F3n67u commentedon Feb 14, 2022
Below solution works for me:
--no-dependenciesoption tovsce packageandvsce publishcommand(because you already bundled your extension, then there is no need to include npm dependencies when package and publish, all things is in your bundle)Source: https://zenn.dev/mkizka/articles/a60fcfcf606768
johnsoncodehk commentedon Feb 15, 2022
Feng Yu (@F3n67u) done, thank you!
If someone need to reference:
65 remaining items
danielbayley commentedon Jan 15, 2026
Nice yyyanghj (@yyyanghj)! Could this be turned into a PR here?
lra8dev commentedon Jan 28, 2026
Try this one:
Fix VS Code extension publishing (#4183)
chore(deps): convert npm → pnpm
trancexpress commentedon Jun 4, 2026
Are there any workarounds when
npmis not installed at all?Seems like removing the prepublish part in scripts avoids the error:
Should be enough for my case...
refactor: remove webview and changelog functionality
https://github.com/microsoft/vscode-vsce/issues/421
https://github.com/microsoft/vscode-vsce/issues/421
https://github.com/microsoft/vscode-vsce/issues/421
https://github.com/microsoft/vscode-vsce/issues/421
https://github.com/microsoft/vscode-vsce/issues/421
https://github.com/microsoft/vscode-vsce/issues/421
https://github.com/microsoft/vscode-vsce/issues/421
https://github.com/microsoft/vscode-vsce/issues/421
https://github.com/microsoft/vscode-vsce/issues/421