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

v4: src/compiler/tsconfig.json extends non-exist file #8839

Closed
hyrious opened this issue Jun 25, 2023 · 0 comments · Fixed by #8859
Closed

v4: src/compiler/tsconfig.json extends non-exist file #8839

hyrious opened this issue Jun 25, 2023 · 0 comments · Fixed by #8859
Labels
bug good first issue A small, encapsulated issue, ideal for a new contributor to Svelte to tackle.

Comments

@hyrious
Copy link

hyrious commented Jun 25, 2023

Describe the bug

https://cdn.jsdelivr.net/npm/[email protected]/src/compiler/tsconfig.json

It references {svelte}/tsconfig.json but the file does not exist. Which will make TypeScript project show errors when importing types from svelte.

This might because there is "files": ["src"] in package.json which includes the nested tsconfig.json file.

I'd suggest remove the 2 tsconfig.json files in release.

Reproduction

Snipaste_2023-06-25_09-19-58

Create an empty TypeScript project with some code that uses svelte types. If you click into that type, the TypeScript server will start analyzing tsconfig.json and report errors.

Well this might be a bug in VS Code that it shouldn't report issues in node_modules with skipLibCheck: true. However this is never being fixed in years.

Logs

Cannot read file '/private/tmp/test-svelte-4/node_modules/svelte/tsconfig.json'.

System Info

System:
    OS: macOS 13.4
    CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
    Memory: 29.34 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.3.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.7.1 - /usr/local/bin/npm
    Watchman: 2023.06.12.00 - /usr/local/bin/watchman
  Browsers:
    Safari: 16.5
  npmPackages:
    svelte: ^4.0.0 => 4.0.0

Severity

annoyance

@dummdidumm dummdidumm added bug good first issue A small, encapsulated issue, ideal for a new contributor to Svelte to tackle. labels Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue A small, encapsulated issue, ideal for a new contributor to Svelte to tackle.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants