Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always displaying vitest error on startup #414

Closed
4 tasks done
FernandoGonzalezHomerti opened this issue Jun 11, 2024 · 2 comments
Closed
4 tasks done

Always displaying vitest error on startup #414

FernandoGonzalezHomerti opened this issue Jun 11, 2024 · 2 comments

Comments

@FernandoGonzalezHomerti
Copy link

FernandoGonzalezHomerti commented Jun 11, 2024

Describe the bug

When I always start VSCode, it appears to me a popup in the right-bottom of the screen saying: "There was an error during Vitest startup. Check the output for more details". And the error says something like: { code: 'ERR_MODULE_NOT_FOUND'}, when I have in my project installed vite and vitest as dev dependencies and the extension of vite and vitest of vscode enabled.

Reproduction

  • Prerequisites: have installed vitest and vite on vscode, and to open by default a node project on vscode startup with vite and vitest in its devDependencies and installed on node_modules
  • Start VS Code on Windows 11
  • (maybe, because it seems the error outputs something of laravel breeze with inertia) have laravel with inertia and vue in the project.

Captura de pantalla 2024-06-11 081046
Captura de pantalla 2024-06-11 081110

Output

Popup in the right-bottom of the screen saying: "There was an error during Vitest startup. Check the output for more details". And the error says something like: { code: 'ERR_MODULE_NOT_FOUND'}.

In Detail:

[INFO 8:10:35 AM] [API] Running Vitest v1.6.0 (superdispatcher/vitest.workspace.js) with Node.js: C:\Program Files\nodejs\node.EXE
[Worker] �[31mfailed to load config from C:\xampp\htdocs\superdispatcher\vendor\laravel\breeze\stubs\inertia-react\vite.config.js�[39
[Worker] �[31m�[1mError�[22m: Cannot find package '@vitejs/plugin-react' imported from C:\xampp\htdocs\superdispatcher\vendor\laravel\breeze\stubs\inertia-react\vite.config.js.timestamp-1718086237927-7c3b1f70d36b8.mjs�[39m
�[90m �[2m❯�[22m packageResolve node:internal/modules/esm/resolve:�[2m841:9�[22m�[39
[Worker] �[90m �[2m❯�[22m moduleResolve node:internal/modules/esm/resolve:�[2m914:18�[22m�[39m
�[90m �[2m❯�[22m defaultResolve node:internal/modules/esm/resolve:�[2m1119:11�[22m�[39m
�[90m �[2m❯�[22m ModuleLoader.defaultResolve node:internal/modules/esm/loader:�[2m542:12�[22m�[39
[Worker] �[90m �[2m❯�[22m ModuleLoader.resolve node:internal/modules/esm/loader:�[2m511:25�[22m�[39m
�[90m �[2m❯�[22m ModuleLoader.getModuleJob node:internal/modules/esm/loader:�[2m241:38�[22m�[39m
�[90m �[2m❯�[22m ModuleJob._link node:internal/modules/esm/module_job:�[2m126:49�[22m�[39m

�[31m�[2m⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯�[22m�[39
[Worker] �[31m�[1mSerialized Error:�[22m�[39m �[90m{ code: 'ERR_MODULE_NOT_FOUND' }�[39
[Error 8:10:38 AM] [Error Error] Vitest process exited with code 1
Error: Vitest process exited with code 1
    at ChildProcess.d (c:\Users\fernando.gonzalez\.vscode\extensions\vitest.explorer-0.12.0\dist\extension.js:20:170)
    at ChildProcess.emit (node:events:514:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:294:12)```

Version

0.12.0

Validations

Copy link

Hello @FernandoGonzalezHomerti. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@sheremet-va
Copy link
Member

Do you have @vitejs/plugin-react installed? Vitest cannot load the config.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 15, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants