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

Terminal not showing errors when running in dev mode. No error checking in code either #17463

Closed
7 tasks done
philippilievski opened this issue Jun 13, 2024 · 2 comments
Closed
7 tasks done

Comments

@philippilievski
Copy link

Describe the bug

When working on a vue project created using vite:
Whenever i save a file with an error the error doesn't immediately show in console. Only upon refreshing the browser page it shows.

In the Vue language-tools somebody told me to move this here:

Reproduction

https://stackblitz.com/edit/vitejs-vite-kubirs?file=counter.js&terminal=dev

Steps to reproduce

  1. Open terminal and create a new project:
    npm create vue@latest
  2. Add Typescript when asked for it
  3. Run npm install in project directory
  4. Start dev server by running: npm run dev
  5. Purposefully generate error in code in my example i typed into Homeview.vue and save the file:
<script setup lang="ts">
import TheWelcome from '../components/TheWelcome.vue'
this is an error generated on purpose ; = ";";
</script>

6.Now the console should not show any error
image

  1. Upon opening the application in the browser the error gets displayed (only in browser)
  2. Only upon page refresh the terminal now also displays the error

System Info

Vue - Official extension or vue-tsc version
v2.0.21

VSCode version
1.90.0

Vue version
3.4.21

TypeScript version
5.4.5

System Info
OS: Ubuntu 22.04.4 LTS
IDE: VSCode and Nvim
Browser: Chrome Version 125.0.6422.141

Used Package Manager

npm

Logs

No response

Validations

Copy link

stackblitz bot commented Jun 13, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@ArnaudBarre
Copy link
Member

This is part of the philosophy of Vite core to be light. You can look for plugin to add TS errors to the console, I've made https://www.npmjs.com/package/vite-plugin-tsc-watch for myself, but https://www.npmjs.com/package/vite-plugin-checker?activeTab=readme is way more popular

@github-actions github-actions bot locked and limited conversation to collaborators Jul 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants