ITADN

Failure in Package Manager Installation Check

#113Openlanius412 创建于 2025-11-30
L
lanius412commented
> This issue might be a special case. ## Environment - WSL2 (confirmed on Ubuntu and Arch Linux) - On Windows, [mise](https://mise.jdx.dev) 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: <https://github.com/honojs/create-hono/blob/66b1a84abf1f28262f0f78f237bbe3c22172dbec/src/hooks/dependencies.ts#L154-L160> ## 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: ```ts spawn(packageManager, ['--version'], { timeout: 5000 })
1 条评论