vitest-dev / vitest-dev/vitest
Could not read source map when debugging test
Nobody has claimed this yet.
- 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
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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