You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a brand new svelte-ts app created using create-vite, the tsconfig.json file shows an error at "references": [{ "path": "./tsconfig.node.json" }]: Referenced project '<path to app>/tsconfig.node.json' may not disable emit.ts
Possibly the correct setting is emitDeclarationOnly instead of noEmit (tsc maybe depends on the .d.ts files of the referenced project to split up the work, and noEmit prevents those from being created? As per this discussion). The error goes away with emitDeclarationOnly: true, but does that mean tsc is doing extra work that esbuild is already handling?
pnpm build and pnpm check succeed, it's just an annoying error (but maybe is indicative of some type checking actually not happening correctly?). Maybe it is actually a VSCode error?
Then open in VSCode, and look at tsconfig.json. It should have a red squiggle on line 20.
OR run npx tsc
If you change line 9 of tsconfig.node.json from "noEmit": true to "emitDeclarationOnly": true and save, the error goes away (but maybe this setting is undesirable?).
If I do everything again with npm, the result is the same.
NOTE: the error doesn't show in the editor in stackblitz using npm or pnpm, but it does if you run npx tsc!
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
With a brand new svelte-ts app created using
create-vite
, thetsconfig.json
file shows an error at"references": [{ "path": "./tsconfig.node.json" }]
:Referenced project '<path to app>/tsconfig.node.json' may not disable emit.ts
The change is relatively recent: cf3f40c
Possibly the correct setting is emitDeclarationOnly instead of noEmit (tsc maybe depends on the
.d.ts
files of the referenced project to split up the work, andnoEmit
prevents those from being created? As per this discussion). The error goes away withemitDeclarationOnly: true
, but does that mean tsc is doing extra work that esbuild is already handling?pnpm build
andpnpm check
succeed, it's just an annoying error (but maybe is indicative of some type checking actually not happening correctly?). Maybe it is actually a VSCode error?Reproduction
https://stackblitz.com/edit/vitejs-vite-vrcca7?file=tsconfig.json
Steps to reproduce
pnpm create vite my-app cd my-app pnpm install
Then open in VSCode, and look at
tsconfig.json
. It should have a red squiggle on line 20.OR run
npx tsc
If you change line 9 of
tsconfig.node.json
from"noEmit": true
to"emitDeclarationOnly": true
and save, the error goes away (but maybe this setting is undesirable?).If I do everything again with npm, the result is the same.
NOTE: the error doesn't show in the editor in stackblitz using npm or pnpm, but it does if you run
npx tsc
!System Info
Used Package Manager
pnpm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: