language-tools
                                
                                 language-tools copied to clipboard
                                
                                    language-tools copied to clipboard
                            
                            
                            
                        ERROR Cannot start nuxt: Cannot find module 'vue-tsc/out/index'
After upgrading to v2
I'm using Nuxt 3 latest with a monorepo config (nuxt layers)
Cross referencing here since it seems to influence also vite-plugin-checker: https://github.com/fi3ework/vite-plugin-checker/issues/306
I think we need an upgrade path for libraries consuming vue-tsc v2.
@danielroe does this require an issue tracking in the nuxt repo?
Nuxt doesn't directly consume vue-tsc and I think vite-plugin-checker (which we use) is already aware.
Thanks 🤗
I have the same issue: ERROR Cannot start nuxt: Cannot find module 'vue-tsc/out/index'
Stack: "nuxt": "^3.10.3", "vue-tsc": "^2.0.4"
Require stack:
- .../app-template/node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/vite-plugin-checker/dist/esm/checkers/vueTsc/prepareVueTsc.js
Downgrade "vue-tsc": "^2.0.4" to "vue-tsc": "^1.8.22", I have tried it and worked.
this error also occurs with storybook build.
> storybook build
  
  @storybook/cli v8.0.4
  
  info => Cleaning outputDir: storybook-static
  info => Loading presets
  info => Building manager..
  info => Manager built (290 ms)
  info => Building preview..
  info => Copying static files: stories/public at storybook-static
  => Failed to build the preview
  Error: Cannot find module 'vue-tsc/out/index'
  Require stack:
  - ./node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected]/node_modules/vite-plugin-checker/dist/esm/checkers/vueTsc/prepareVueTsc.js
      at Module._resolveFilename (node:internal/modules/cjs/loader:[114](https://github.com/PlusAuth/plusauth-widget/actions/runs/8451989016/job/23151446690#step:5:116)4:15)
      at Module._resolveFilename (./node_modules/.pnpm/[email protected][email protected]/node_modules/esbuild-register/dist/node.js:4799:36)
      at Function.resolve (node:internal/modules/helpers:187:19)
      at <anonymous> (./node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected]/node_modules/vite-plugin-checker/src/checkers/vueTsc/prepareVueTsc.ts:14:31)
      at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
      at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
      at createCheckers (./node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected]/node_modules/vite-plugin-checker/src/main.ts:46:37)
      at config (./node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected]/node_modules/vite-plugin-checker/src/main.ts:86:18)
      at async runConfigHook (file://./node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:68541:25)
      at async resolveConfig (file://./node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:67996:14)
Looks like the latest version "vue-tsc": "^2.0.10" is working fine with "nuxt": "^3.11.2"
Looks like the latest version
"vue-tsc": "^2.0.10"is working fine with"nuxt": "^3.11.2"
Not exactly. I've just upgraded nuxt and vue-tsc to latest versions (same as you said) and the error persists:
Cannot start nuxt:  Cannot find module 'vue-tsc/out/index'
I can confirm. Still am issue on my end
I can confirm too: problem persists even with a simple vue-tsc --noEmit invocation
Confirmed, problem remains in "^3.11.2", and "vue-tsc": "^2.0.16"
Downgrade
"vue-tsc": "^2.0.4"to"vue-tsc": "^1.8.22", I have tried it and worked.
thanks it worked for me
Looks like the latest version
"vue-tsc": "^2.0.10"is working fine with"nuxt": "^3.11.2"
Issue is still there.
Still here with vue-tsc version 2.0.19.
 ERROR  Cannot start nuxt:  Cannot find module 'vue-tsc/out/index'                                                                                                          10:21:56 ч.  
Require stack:
- \node_modules\vite-plugin-checker\dist\esm\checkers\vueTsc\prepareVueTsc.js
- Operating System: Windows_NT
- Node Version: v20.12.2
- Nuxt Version: 3.11.2
- CLI Version: 3.11.1
- Nitro Version: 2.9.6
- Package Manager: [email protected]
- Builder: -
- User Config: runtimeConfig, modules, nitro, app, typescript, routeRules, devtools
- Runtime Modules: @pinia/[email protected], @nuxt/[email protected], @nuxt/[email protected]
- Build Modules: -
The issue is still there. Appears when upgrading vue-tsc from 1.8.27 to 2x.
    "nuxt": "^3.11.2",
    "vue": "^3.4.27",
    "vue-router": "^4.3.2",
It appears that all Nuxt repositories configured with typescript: { typeCheck: true } and using vue-tsc version 1.8.27 or later are experiencing the same error: vue-tsc/out/index.
is this related? I have issue with 3.11.2 and global components like i18T not being recognized by tsc. it occurs only from vue-tsc 1.8.24
here is a reproduction: https://stackblitz.com/edit/github-m5xc5v-gi1rab?file=package.json
abort npm run dev, and run:
npm run typecheck
you'll get error:
error TS2339: Property 'I18nT' does not exist on type '{}'.
3     <I18nT keypath="something">asdfds</I18nT>
now change vue-tsc": "1.8.27" to vue-tsc": "1.8.22" and npm install, now it will work
Same issue still happening with Nuxt3 + vue-tsc 2.0.21
Error: Cannot find module 'vue-tsc/out/index'
Any updates? Still occurring with 2.0.21 and Nuxt 3.12.2
Same issue still happening with Nuxt v3.12.2 and vue-tsc 2.0.21. Any updates?
There is no vue-tsc/out/index in this codebase at all. Could you guys provide a reproduction?
If you are using vite-plugin-checker or nuxt's typeCheck option - sorry it's not an issue on our side: https://github.com/fi3ework/vite-plugin-checker/blob/main/packages/vite-plugin-checker/src/checkers/vueTsc/prepareVueTsc.ts#L14. Please follow https://github.com/fi3ework/vite-plugin-checker/issues/306.
https://github.com/fi3ework/vite-plugin-checker/pull/327
export default defineNuxtConfig({
  typescript: {
    strict: true,
    typeCheck: false
  }
}
Disable type checking at build time and run it from the console or as script in package.json
npx nuxi typecheck
A fix is on its way, if somebody can help I'm sure it'll be appreciated: https://github.com/fi3ework/vite-plugin-checker/pull/327
Closing, as https://github.com/fi3ework/vite-plugin-checker/pull/327 had been merged.
The issue still occurs, it seems the require stack is still using the old vite-plugin-checker release:
 ERROR  Cannot start nuxt:  Cannot find module 'vue-tsc/out/index'                                                                                                                                               1:16:04 PM
Require stack:
- /.../node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected]/node_modules/vite-plugin-checker/dist/esm/checkers/vueTsc/prepareVueTsc.js
  Require stack:
  - node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected]/node_modules/vite-plugin-checker/dist/esm/checkers/vueTsc/prepareVueTsc.js
  at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
  at Function.resolve (node:internal/modules/helpers:190:19)
Yes, if you are using nuxt then you will have to wait for them to upgrade their dependencies
Ok, I hope they'll update soon. For now I'm using an override in my package.json for my nuxt project, which makes it work in the meantime:
  "pnpm": {
    "overrides": {
     "vite-plugin-checker": "0.7.0"
    }
  }
You'll get it soon, in next Nuxt patch - follow https://github.com/nuxt/nuxt/pull/27648.