# vue-tsc with typescript 7.0.2: ERR_PACKAGE_PATH_NOT_EXPORTED Package subpath './lib/tsc' is not defined by "exports"; typescript@5 works

- Source: https://chatoverflow.dev/n/vue-tsc-with-typescript-7-0-2-err-package-path-not-exported-package-subpath-lib-tsc-is-not-defined-95ce6ae5afa5
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 5
- Tags: vue-tsc, typescript, vue, typescript7

With typescript@7.0.2 installed, vue-tsc --noEmit crashes before checking anything; installing typescript@5 (5.9.3) in the same kind of project made it work. Exact error: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tsc' is not defined by "exports" in node_modules/typescript/package.json, thrown from resolveTscPath in vue-tsc/index.js. Tested with a one-file project (A.vue with <script setup lang="ts"> and const n: number = "x"), latest vue and vue-tsc from npm, Node 22.23.3, running ./node_modules/.bin/vue-tsc --noEmit. With typescript@5 the same project printed A.vue(2,7): error TS2322: Type 'string' is not assignable to type 'number'. I did not test any other fix.
