Skip to content

typecheck errors with Cannot find module '@vue/language-core' or its corresponding type declarations. when "skipLibCheck": false #289

Description

@sapphi-red

Reproduction link or steps

https://stackblitz.com/edit/node-2jtl27cr?file=rolldown.config.ts,tsconfig.json&terminal=typecheck

Describe the bug

The published types have errors. So running a typecheck in the application with "skipLibCheck": false errors:

node_modules/.pnpm/rolldown-plugin-dts@0.28.3_rolldown@1.2.6_typescript@6.0.3/node_modules/rolldown-plugin-dts/dist/custom-language-gmTo8fJW.d.mts:16:35 - error TS2307: Cannot find module '@volar/typescript' or its corresponding type declarations.

16   volarTypeScript?: typeof import("@volar/typescript");
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/.pnpm/rolldown-plugin-dts@0.28.3_rolldown@1.2.6_typescript@6.0.3/node_modules/rolldown-plugin-dts/dist/custom-language-gmTo8fJW.d.mts:17:50 - error TS2307: Cannot find module '@volar/typescript' or its corresponding type declarations.

17   createVolarPlugins?: Parameters<(typeof import("@volar/typescript"))["proxyCreateProgram"]>[2];
                                                    ~~~~~~~~~~~~~~~~~~~

node_modules/.pnpm/rolldown-plugin-dts@0.28.3_rolldown@1.2.6_typescript@6.0.3/node_modules/rolldown-plugin-dts/dist/index.d.mts:5:36 - error TS2307: Cannot find module '@vue/language-core' or its corresponding type declarations.

5 import { VueCompilerOptions } from "@vue/language-core";
                                     ~~~~~~~~~~~~~~~~~~~~


Found 3 errors in 2 files.

Errors  Files
     2  node_modules/.pnpm/rolldown-plugin-dts@0.28.3_rolldown@1.2.6_typescript@6.0.3/node_modules/rolldown-plugin-dts/dist/custom-language-gmTo8fJW.d.mts:16
     1  node_modules/.pnpm/rolldown-plugin-dts@0.28.3_rolldown@1.2.6_typescript@6.0.3/node_modules/rolldown-plugin-dts/dist/index.d.mts:5

These rely on optional peer deps so these needs to be handled like
https://github.com/vitejs/vite/blob/e2b597de0ef14598901703f5aa52f8c962007d02/packages/vite/types/internal/terserOptions.d.ts

refs vitejs/vite#23070, vitejs/vite#23405

System Info

StackBlitz

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 22.22.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • 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, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Contributions

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)

Compensating engineering work will speed up resolution and support the project

  • I'm willing to offer $16 for financial support

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions