-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Labels
p4-importantViolate documented behavior or significantly improves performance (priority)Violate documented behavior or significantly improves performance (priority)
Description
Describe the bug
Saw this is a downstream repository:
node_modules/vitest/dist/chunks/traces.d.B8ukBJqA.d.ts:5:44 - error TS2307: Cannot find module '@opentelemetry/api' or its corresponding type declarations.
5 import { Context, Span, SpanOptions } from '@opentelemetry/api';
~~~~~~~~~~~~~~~~~~~~
node_modules/vitest/dist/index.d.ts:26:8 - error TS2307: Cannot find module '@opentelemetry/api' or its corresponding type declarations.
26 import '@opentelemetry/api';
~~~~~~~~~~~~~~~~~~~~
Found 2 errors in 2 files.
Errors Files
1 node_modules/vitest/dist/chunks/traces.d.B8ukBJqA.d.ts:5
1 node_modules/vitest/dist/index.d.ts:26
I saw in another type-related issue you guys are suggesting to turn skipLibCheck on. We cannot do that. It would skip type checking all .d.ts files in our project (not just node_modules), hiding potential real issues. Already got bit by that.
Reproduction
mkdir vitest-type-issue
cd vitest-type-issue
npm init -y
npm pkg set type=module
npm i vitest typescript
npx tsc --init --skipLibCheck false
echo "import { expect } from 'vitest'; console.log(expect);" > main.ts
npx tsc --noEmitSystem Info
Fedora 43
Node 24.11.1
npm 11.6.3Used Package Manager
npm
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.
Metadata
Metadata
Assignees
Labels
p4-importantViolate documented behavior or significantly improves performance (priority)Violate documented behavior or significantly improves performance (priority)