-
-
Notifications
You must be signed in to change notification settings - Fork 221
Closed
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.bugSomething isn't workingSomething isn't working
Description
Describe the bug
When setting moduleResolution to Node16 inside tsconfig.json I encounter two issues:
-
the "zero-effort typesafety" functionality stops working
-
if I run
svelte-check:watchand safe thetsconfig.jsonfile, the process crashes with following error messageWatching for file changes.../home/my-app/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:139552 return !!entry.sourceFile; ^ TypeError: Cannot read properties of undefined (reading 'sourceFile') at isDocumentRegistryEntry (/home/my-app/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:139552:24) at getDocumentRegistryEntry (/home/my-app/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:139612:25) at Object.releaseDocumentWithKey (/home/my-app/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:139718:25) at /home/my-app/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:169519:45 at Object.forEach (/home/my-app/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:181:30) at Object.dispose (/home/my-app/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:169518:20) at dispose (/home/my-app/node_modules/.pnpm/svelte-check@3.1.4_svelte@3.57.0/node_modules/svelte-check/dist/src/index.js:90308:25) at watchConfigCallback (/home/my-app/node_modules/.pnpm/svelte-check@3.1.4_svelte@3.57.0/node_modules/svelte-check/dist/src/index.js:90343:9) at /home/my-app/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:6724:17 at /home/my-app/node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/typescript.js:6439:180
Reproduction
demo repository: https://github.com/ivanhofer/svelte-check-moduleresolution-node16
/routes/+page.sveltecontains an error. If you runsvelte-checknothing shows up.datais typed asany.
OncemoduleResolutionremoved from thetsconfig.json, the error shows up.- run
check:watchand hit save on the openedtsconfig.jsonfile. The process should crash.
OncemoduleResolutionremoved from thetsconfig.json, saving that file does not crash the process.
Expected behaviour
I would expect the Svelte language-tools also to function with moduleResolution set to Node16
System Info
- OS: WSL with Ubuntu 22.04 on Windows 11
- IDE: VSCode
Which package is the issue about?
Svelte for VS Code extension, svelte-language-server, svelte-check
Additional Information, eg. Screenshots
No response
Metadata
Metadata
Assignees
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.bugSomething isn't workingSomething isn't working