Not planned
Listed in
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.
Project: https://github.com/muuvmuuv/vscode-sundial
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 got@10.5.5
npm ERR! missing: @szmarczak/http-timer@^4.0.0, required by got@10.5.5
npm ERR! missing: @types/cacheable-request@^6.0.1, required by got@10.5.5
npm ERR! missing: cacheable-lookup@^2.0.0, required by got@10.5.5
npm ERR! missing: cacheable-request@^7.0.1, required by got@10.5.5
npm ERR! missing: decompress-response@^5.0.0, required by got@10.5.5
npm ERR! missing: duplexer3@^0.1.4, required by got@10.5.5
npm ERR! missing: get-stream@^5.0.0, required by got@10.5.5
npm ERR! missing: lowercase-keys@^2.0.0, required by got@10.5.5
npm ERR! missing: mimic-response@^2.0.0, required by got@10.5.5
npm ERR! missing: p-cancelable@^2.0.0, required by got@10.5.5
npm ERR! missing: p-event@^4.0.0, required by got@10.5.5
npm ERR! missing: responselike@^2.0.0, required by got@10.5.5
npm ERR! missing: to-readable-stream@^2.0.0, required by got@10.5.5
npm ERR! missing: type-fest@^0.9.0, required by got@10.5.5
npm ERR! missing: dns-socket@^4.2.0, required by public-ip@4.0.0
npm ERR! missing: got@^9.6.0, required by public-ip@4.0.0
npm ERR! missing: is-ip@^3.1.0, required by public-ip@4.0.0
Metadata
Metadata
Assignees
Labels
No labels
Activity
muuvmuuv commentedon Feb 11, 2020
Equivalent command would be:
pnpm list --prod --json
(yarn
uses 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
vsce
should be package manager agnostic. Having it usingnpm
instead of using whatever the dev has is far from ideal. I had to usenpm
when I usepnpm
for 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=pnpm
line 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-dependencies
option tovsce package
andvsce publish
command(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
86 remaining items