Skip to content

Extension fails to initialize #614

@Matix-Media

Description

@Matix-Media

Describe the bug

When I click on "Refresh Tests" in vs code (button shown in screenshot below):

Image

Resolving vitest gets displayed for a short second and than goes back to the screen saying no tests found.

I get a vs code notification saying: "Failed to start Vitest. Check the output for more details."

The output is attached below.

I assume that the error lies within me using fnm for managing my node version which only appends the correct bin directory to my path when starting up a shell with my user profile.

Reproduction

Use fnm to install node with their recommended setup approach: https://github.com/Schniz/fnm?tab=readme-ov-file#shell-setup

DO NOT HAVE NODE IN YOUR NORMAL PATH

Try to use the extension in a js project with vitest installed

Output

[Error 2:45:32 PM] Unable to find 'node' executable.
Make sure to have Node.js installed and available in your PATH.
Current PATH: 'C:\Program Files (x86)\VMware\VMware Player\bin\;C:\Python311\Scripts\;C:\Python311\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files\Azure Data Studio\bin;C:\Program Files\Go\bin;C:\Users\Public\Öffentliche Tools\ffmpeg;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7\;c:\Users\matix\AppData\Local\Programs\cursor\resources\app\bin;C:\Program Files (x86)\Gpg4win\..\GnuPG\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\matix\dev\flutter\bin;C:\Users\matix\AppData\Local\Microsoft\WindowsApps;C:\Users\matix\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\matix\.dotnet\tools;C:\Program Files\Azure Data Studio\bin;C:\Users\matix\go\bin;C:\Users\matix\.deno\bin;C:\Users\matix\.nixpacks\bin;C:\Users\matix\AppData\Local\Android\sdk\platform-tools;C:\tools\dart-sdk\bin;C:\Users\matix\AppData\Local\Pub\Cache\bin;C:\Users\matix\AppData\Local\JetBrains\Toolbox\scripts;C:\Users\matix\AppData\Local\Microsoft\WinGet\Packages\Schniz.fnm_Microsoft.Winget.Source_8wekyb3d8bbwe;'.
[Error 2:45:32 PM] [Error AggregateError] The extension could not load some configs.
AggregateError: The extension could not load some configs.
    at ac (c:\Users\matix\.vscode\extensions\vitest.explorer-1.18.0\dist\extension.js:20:9455)
    at an._defineTestProfiles (c:\Users\matix\.vscode\extensions\vitest.explorer-1.18.0\dist\extension.js:26:12360)
    at an.defineTestProfiles (c:\Users\matix\.vscode\extensions\vitest.explorer-1.18.0\dist\extension.js:26:11747)
    at cb.$refreshTests (file:///c:/Users/matix/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:71748)

Extension Version

1.18.0

Vitest Version

3.1.3

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions