nuxi typecheck returns errors from files in node_modules
A couple oddities with
nuxi typecheck
-- I find it reporting on errors that appear in my node_modules directory. Granted, its for a package that I am extending (extends
in config). But still, shouldn't it stay confined to the current application? I have tried setting the root to src
in the typecheck
npm script but it still reports on those errors.
The other thing is, those errors don't show up in my ide. I have the layer package added to the vscode ide and it doesn't report on any of the errors that nuxi typecheck does (that are contained in the node_modules dir).
Have people worked around this somehow? I imagine I could execute vue-tsc
manually3 Replies
Do you have both typescript and vue-tsc dependencies? If so, executing
vue-tsc —noEmit
would yield the same outcome as nuxi typecheck
yeah. the thing is, when i go into the layer dir (separate package) and run typecheck, there are no errors
so i'm trying to understand what the difference would be. they both have the same versions of typescript and vue-tsc installed
i have tried with strict: false in the layer (it is usually true) and the parent app is currently not strict
ah I realize there is a bunch of discussion around the optional props issue.
https://github.com/vuejs/core/issues/11733
https://github.com/nuxt/nuxt/issues/28869
fix (vue core): https://github.com/vuejs/core/pull/11644
GitHub
use Partial in defineProps, $props lose type · Issue #11733 · vuejs...
Vue version 3.4.38 Link to minimal reproduction https://play.vuejs.org/#eNqFUktu2zAQvcqAmySAIS3SReHKBvoJinTRGmmXBAJCGilMKJIgR7YBQTfokXqnXqFDOo5VIB+uODPvzbz5jOKj98V2QLEUVayD9gQRafBglO1WUlCUYi2t7r0LB...
GitHub
Typecheck (vue-tsc) errors on all that is auto imported · Issue #28...
Environment Operating System: Darwin Node Version: v22.8.0 Nuxt Version: 3.12.4 CLI Version: 3.13.1 Nitro Version: 2.9.7 Package Manager: [email protected] Builder: - User Config: telemetry, experimental,...
GitHub
fix(runtime-core): correct type inference of all-optional props by ...
fix #11733
fix vuejs/language-tools#4704