Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get an error from vue-tsc after change app.vue and save. #17680

Open
lichaozhy opened this issue Dec 5, 2024 · 14 comments
Open

Get an error from vue-tsc after change app.vue and save. #17680

lichaozhy opened this issue Dec 5, 2024 · 14 comments
Labels
area/typescript bug/0-needs-info Need more info to reproduce bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@lichaozhy
Copy link

What happened?

Get an "not found" error after file changes watching. like,

> quasar dev


 .d88888b.
d88P" "Y88b
888     888
888     888 888  888  8888b.  .d8888b   8888b.  888d888
888     888 888  888     "88b 88K          "88b 888P"
888 Y8b 888 888  888 .d888888 "Y8888b. .d888888 888
Y88b.Y8b88P Y88b 888 888  888      X88 888  888 888
 "Y888888"   "Y88888 "Y888888  88888P' "Y888888 888
       Y8b

 App • Using quasar.config.ts in "ts" format

 App • ⚠️  ️️Setting port to closest one available: 9001


 » Reported at............ 12/5/2024 3:52:43 PM
 » App dir................ D:\workspace\quasar
 » App URL................ http://192.168.31.213:9001/
                           http://localhost:9001/
 » Dev mode............... spa
 » Pkg quasar............. v2.17.4
 » Pkg @quasar/app-vite... v2.0.0
 » Browser target......... es2022|firefox115|chrome115|safari14

 App • Opening default browser at http://localhost:9001/

[ESLint] Found 0 error and 0 warning

[vue-tsc] Found 0 errors. Watching for file changes.
[ESLint] Found 0 error and 0 warning

 ERROR(vue-tsc)  File 'D:/workspace/quasar/src/App.vue' not found.
  The file is in the program because:
    Matched by include pattern '.quasar/./../**/*' in 'D:/workspace/quasar/tsconfig.json'
 FILE  undefined:

undefined

[vue-tsc] Found 1 error. Watching for file changes.

What did you expect to happen?

It SHOULD work correctly without any errors.

Reproduction URL

https://github.com/lichaozhy/quasar-issue

How to reproduce?

  1. Init
$ npm init quasar@latest
  1. To change & save ./src/App.vue

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

TypeScript Support

Platforms/Browsers

Chrome

Quasar info output

Operating System - Windows_NT(10.0.26100) - win32/x64
NodeJs - 22.11.0

Global packages
  NPM - 10.9.1
  yarn - Not installed
  pnpm - Not installed
  bun - Not installed
  @quasar/cli - undefined
  @quasar/icongenie - Not installed
  cordova - Not installed

Important local packages
  quasar - 2.17.4 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 2.0.0 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.16.14 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.5.13 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.5.0
  pinia - 2.3.0 -- Intuitive, type safe and flexible Store for Vue
  vite - 6.0.2 -- Native-ESM powered web dev build tool
  vite-plugin-checker - Not installed
  eslint - 9.16.0 -- An AST-based pattern checker for JavaScript.
  esbuild - 0.24.0 -- An extremely fast JavaScript and CSS bundler and minifier.
  typescript - 5.5.4 -- TypeScript is a language for application scale JavaScript development
  workbox-build - Not installed
  register-service-worker - Not installed
  electron - Not installed
  @electron/packager - Not installed
  electron-builder - Not installed
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Networking
  Host - LAPTOP-I624BLRS
  WLAN - 192.168.31.213

Relevant log output

App • Opening default browser at http://localhost:9001/

[ESLint] Found 0 error and 0 warning

[vue-tsc] Found 0 errors. Watching for file changes.
[ESLint] Found 0 error and 0 warning

 ERROR(vue-tsc)  File 'D:/workspace/quasar/src/App.vue' not found.
  The file is in the program because:
    Matched by include pattern '.quasar/./../**/*' in 'D:/workspace/quasar/tsconfig.json'
 FILE  undefined:

undefined

[vue-tsc] Found 1 error. Watching for file changes.
[ESLint] Found 0 error and 0 warning
[ESLint] Found 0 error and 0 warning
[ESLint] Found 0 error and 0 warning
[ESLint] Found 0 error and 0 warning

 ERROR(vue-tsc)  File 'D:/workspace/quasar/src/App.vue' not found.
  The file is in the program because:
    Matched by include pattern '.quasar/./../**/*' in 'D:/workspace/quasar/tsconfig.json'
 FILE  undefined:

undefined

 ERROR(vue-tsc)  File 'D:/workspace/quasar/src/pages/ErrorNotFound.vue' not found.
  The file is in the program because:
    Matched by include pattern '.quasar/./../**/*' in 'D:/workspace/quasar/tsconfig.json'
 FILE  undefined:

undefined

[vue-tsc] Found 2 errors. Watching for file changes.
[ESLint] Found 0 error and 0 warning

Additional context

No response

@lichaozhy lichaozhy added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels Dec 5, 2024
@github-actions github-actions bot added area/typescript bug/1-hard-to-reproduce A reproduction is available, but it's hard to reproduce, so it has a lower priority. bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite labels Dec 5, 2024
@rstoenescu
Copy link
Member

Hi,

Cannot reproduce on a new project. I suggest you do a pnpm/yarn/npm/bun clean install (delete node_modules and the corresponding lock file).

image

@rstoenescu
Copy link
Member

Tried your exact project folder that you supplied. Same thing (works).

@rstoenescu rstoenescu added bug/0-needs-info Need more info to reproduce and removed bug/1-hard-to-reproduce A reproduction is available, but it's hard to reproduce, so it has a lower priority. labels Dec 5, 2024
@lichaozhy
Copy link
Author

Tried your exact project folder that you supplied. Same thing (works).

sorry i forgot to push...

@lichaozhy
Copy link
Author

Occur error when save. Even there is no changes. Maybe it is bug about fs-watching in vue-tsc?
Animation

@rstoenescu
Copy link
Member

I saved the file (with and without changes), but it works as expected.

@lichaozhy
Copy link
Author

I saved the file (with and without changes), but it works as expected.

on windows? The old @quasar/app-vite^1.x.x works well...

Any other suggestions?

@rstoenescu
Copy link
Member

Tested on macos. Will be able to test on Windows later today.
But regardless, this would be an external issue with vue-tsc or with vite-plugin-checker.
It also matters if you are on WSL or not. There is some info for windows devs in the docs.

@rstoenescu
Copy link
Member

Tested on a Windows 11 Home too and could not reproduce. Used Git Bash as shell (so not on WSL). :(

@rstoenescu
Copy link
Member

Can you use the "regular" terminal instead of the VSCode one pls? Who knows...

@rstoenescu
Copy link
Member

One more thing: I am on Node 20, not 22. Can you test with v20 also, pls?

@lichaozhy
Copy link
Author

  • in powershell not work
  • using node 20.17 not work

@lichaozhy
Copy link
Author

There are some things wrong in vue-tsc...

npx vue-tsc -w

then

[11:09:59 PM] File change detected. Starting incremental compilation...

error TS6053: File 'D:/workspace/quasar/src/pages/IndexPage.vue' not found.
  The file is in the program because:
    Matched by include pattern '.quasar/./../**/*' in 'D:/workspace/quasar/tsconfig.json'

[11:09:59 PM] Found 1 error. Watching for file changes.

@lichaozhy
Copy link
Author

I found renaming the file can solve the problem temporarily.

@lichaozhy
Copy link
Author

I have to disable vue-tsc now. in quasar.config.ts,

...
        [
          'vite-plugin-checker',
          {
            vueTsc: false, // set to false
            eslint: {
              lintCommand: 'eslint -c ./eslint.config.js "./src*/**/*.{ts,js,mjs,cjs,vue}"',
              useFlatConfig: true,
            },
          },
          { server: false },
        ],
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/typescript bug/0-needs-info Need more info to reproduce bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

2 participants