volta icon indicating copy to clipboard operation
volta copied to clipboard

(Windows ZIP) `volta setup` not generating shims

Open loganmzz opened this issue 2 years ago • 5 comments

OS : Windows

As I miss admin rights (MSI don't want to proceed without UAC), I downloaded ZIP and put the the binaries to the PATH. I run volta setup which has added the supposed "shim directory" to the PATH. However, the mentionned directory is empty. I also tried to install a Node version but it remains empty.

loganmzz avatar Mar 27 '23 08:03 loganmzz

For zip install, you need to duplicate volta-shim.exe to <node/npm/npx/yarn/pnpm>.exe manually since there is no shimming automation for them when using zip install.

chawyehsu avatar Mar 30 '23 04:03 chawyehsu

It would be nice that volta setup does it and/or instructions are added on installation documentation. I just found the workaround by browsing GH issues :/

loganmzz avatar Mar 30 '23 06:03 loganmzz

Hi @loganmzz, thanks for raising that! I agree we can make volta setup detect the case where the core shims aren't available and create them. We do something like that on Unix platforms, but there are some complexities with Windows—we need to copy the shim executable with a different name, rather than making it a link.

This also connects to related efforts to improve the mechanism we use for shimming on Windows.

charlespierce avatar Apr 19 '23 19:04 charlespierce

May I ask if this problem still exists? I want to use zip installation for easy installation on all my Windows computers

cheezmil avatar Aug 20 '24 17:08 cheezmil

Hi @AlexanderDash, I believe it is still open / outstanding. We haven't had the time to invest in non-standard installations as of yet. As a workaround, after unpacking the zip, you can make several copies of volta-shim.exe in the same directory with the names:

  • node.exe
  • npm.exe
  • npx.exe
  • yarn.exe
  • yarnpkg.exe
  • pnpm.exe
  • pnpx.exe

That is effectively what the installer does internally for the "built-in" shims.

charlespierce avatar Aug 20 '24 17:08 charlespierce