Skip to content

[Bug Report] Error about missing source map in Vitest #72

@nikolawork

Description

@nikolawork

Describe the bug
When importing async-wait-until in Vitest I get the following warning in the console.

10:57:02 AM [vite] (client) Failed to load source map for /[...]/node_modules/async-wait-until/dist/index.esm.js.
Error: An error occurred while trying to read the map file at index.esm.js.map
Error: ENOENT: no such file or directory, open '/[...]/node_modules/async-wait-until/dist/index.esm.js.map'
    at async open (node:internal/fs/promises:639:25)
    at async Object.readFile (node:internal/fs/promises:1243:14)
    at async extractSourcemapFromFile (file:///[...]/node_modules/vite/dist/node/chunks/dep-CXCa-anf.js:8303:65)
    at async loadAndTransform (file:///[...]/node_modules/vite/dist/node/chunks/dep-CXCa-anf.js:26379:22)

To Reproduce
Steps to reproduce the behavior:

  1. Import async-wait-until in a Vitest test file like so: import { waitUntil } from 'async-wait-until';
  2. Use waitUntil in a test
  3. Run the test

Expected behavior
No warning is logged to the console.

Additional context
Note: this isn't a breaking bug and doesn't prevent me from using waitUntil in Vitest.

Thanks for the library!

Metadata

Metadata

Assignees

Labels

Bug ReportThis is a bug report

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions