This issue might be a special case.
Environment
-
WSL2 (confirmed on Ubuntu and Arch Linux)
-
On Windows, mise is used to install deno
-
On WSL, deno is not installed
This issue also occurs with other package managers besides Deno.
Behavior
After selecting “Which template do you want to use?”, the process freezes.
Debugging shows the freeze happens at checkPackageManagerInstalled:
|
function checkPackageManagerInstalled(packageManager: string) { |
|
return new Promise<boolean>((resolve) => { |
|
spawn(packageManager, ['--version']) |
|
.then(() => resolve(true)) |
|
.catch(() => resolve(false)) |
|
}) |
|
} |
Cause
WSL’s interop
https://wsl.dev/technical-documentation/interop/
On Windows,
mise use -g deno creates a deno file and a deno.cmd file in the mise shims directory.
WSL interop attempts to execute the Windows-side deno file, which causes the process to hang.
If deno.exe is in the Windows Path, this issue will not occur.
Solution
Add a timeout option to the spawn command:
spawn(packageManager, ['--version'], { timeout: 5000 })
Environment
WSL2 (confirmed on Ubuntu and Arch Linux)
On Windows, mise is used to install deno
On WSL, deno is not installed
This issue also occurs with other package managers besides Deno.
Behavior
After selecting “Which template do you want to use?”, the process freezes.
Debugging shows the freeze happens at checkPackageManagerInstalled:
create-hono/src/hooks/dependencies.ts
Lines 154 to 160 in 66b1a84
Cause
WSL’s interop
https://wsl.dev/technical-documentation/interop/
On Windows,
mise use -g denocreates adenofile and adeno.cmdfile in the mise shims directory.WSL interop attempts to execute the Windows-side
denofile, which causes the process to hang.If
deno.exeis in the Windows Path, this issue will not occur.Solution
Add a
timeoutoption to thespawncommand: