Skip to content

2.1.4: Failed to load source map for typescript.js #6806

@RobinTail

Description

@RobinTail

Describe the bug

While upgrading vitest from 2.1.3 to 2.1.4 this error appeared in the beginning of the tests.
It's not causing tests to fail though.

 RUN  v2.1.4 ...
      Coverage enabled with istanbul

4:01:17 AM [vite] Failed to load source map for .../node_modules/typescript/lib/typescript.js.
Error: An error occurred while trying to read the map file at typescript.js.map
Error: ENOENT: no such file or directory, open '.../node_modules/typescript/lib/typescript.js.map'

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-lgenvr?file=src%2Fbasic.ts

Seems to be related to importing typescript:

import { factory } from 'typescript';

System Info

System:
    OS: macOS 14.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 623.28 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v20.11.1/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
    pnpm: 9.11.0 - ~/.nvm/versions/node/v20.11.1/bin/pnpm
    bun: 1.1.32 - /usr/local/bin/bun
  Browsers:
    Chrome: 130.0.6723.70
    Safari: 18.0.1
  npmPackages:
    @vitest/coverage-istanbul: ^2.0.3 => 2.1.4
    vitest: ^2.0.3 => 2.1.4

Used Package Manager

yarn

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    p3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions