vitest-dev / vitest-dev/vitest

Could not read source map when debugging test

Open
#1,920 3 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

p2-edge-case
Dominant language
TypeScript
Stars
17.1k
Forks
2k
Avg merge
1d 22h
Merged PRs (30d)
94

Description

Describe the bug

Could not read source map for @vite/env: ENOENT: no such file or directory.

Reproduction

Set up a new remix project like so: npx create-remix --template remix-run/indie-stack.
Then add the debugger like described here: https://vitest.dev/guide/debugging.html

When now opening the debugger, the debug console says this:

Could not read source map for file:///Users/user/remix-indie/remix/@vite/env: ENOENT: no such file or directory, open '/Users/user/remix-indie/remix/@vite/env.mjs.map'
System Info
npmPackages:
    @vitejs/plugin-react: ^1.3.2 => 1.3.2
    vite: ^2.9.10 => 2.9.15
    vitest: ^0.14.1 => 0.14.2
  System:
    OS: macOS 12.5.1, M1
Used Package Manager

yarn

Validations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with a new Remix project from the remix-run/indie-stack template, Vitest's debugging setup, and the listed Vite and Vitest versions. Start with the debugger output for @vite/env and its missing .mjs.map file; done means opening the debugger no longer reports the ENOENT source-map error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vite
Domain
testing, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.