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

vue-tsc --noEmit --watch does not report error after editing .vue files #1082

Closed
fi3ework opened this issue Mar 20, 2022 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@fi3ework
Copy link

fi3ework commented Mar 20, 2022

Thanks for all the hard work on vue-tsc, it's great. I'm trying to invoke vue-tsc in JS API for vite-plugin-checker, and I found some issues in 0.33.2-patch.1.

Describe the bug

I created a new vue3-ts project by the official scaffold. And bump vue-tsc to 0.33.2-patch.1. Then run pnpm exec vue-tsc --noEmit --watch. Then I change the code in App.vue to <HelloWorld msg2="Hello Vue 3 + TypeScript + Vite" /> to make a type error. But no errors were thrown from the watch process. But the newly added type error in .ts can be thrown in watch mode. And if start the watch process when there's already a type error in .vue. It can report the initial error but will no longer report new errors in any .vue file. So it looks like the modification on .vue is not watched by vue-tsc.

Reproduction

  1. pnpm create vite bug-vue-tsc
  2. select vue and vue-ts
  3. pnpm i vue-tsc@latest -D
  4. pnpm exec vue-tsc --noEmit --watch
  5. change <HelloWorld msg= to <HelloWorld msg1=

I made a stackblitz to reproduce it. https://stackblitz.com/edit/vitejs-vite-wegjku?file=src%2FApp.vue&terminal=dev
run npm run watch and change msg1 to msg2. Still reports msg1.

Expected behavior

type error reported.

System info

npx envinfo --system --npmPackages vue-tsc --binaries --browsers

System:
OS: macOS 12.3
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 173.82 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.14.0 - ~/Library/Caches/fnm_multishells/19496_1647768370180/bin/node
Yarn: 1.22.18 - ~/Library/Caches/fnm_multishells/19496_1647768370180/bin/yarn
npm: 8.3.1 - ~/Library/Caches/fnm_multishells/19496_1647768370180/bin/npm
Browsers:
Chrome: 99.0.4844.74
Safari: 15.4
npmPackages:
vue-tsc: ^0.33.2-patch.1 => 0.33.2-patch.1

Package manager

pnpm@^6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants