Skip to content

Failure in Package Manager Installation Check #113

@lanius412

Description

@lanius412

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 })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions