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

'@tsconfig/svelte' error after upgrading to @smui/[email protected] (for Svelte 5 upgrade) #680

Open
amarsiingh opened this issue Jan 17, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@amarsiingh
Copy link

Describe the bug
We've been attempting to upgrade our project to Svelte 5; so when we upgrade our SMUI packages to use v8, the app throws error pointing to missing '@tsconfig/svelte/tsconfig.json' file

To Reproduce
Steps to reproduce the behavior:

  1. Upgrade any component package to v8
  2. then attempt to run the app.
  3. See error

Expected behavior
Vite should be able to bundle the app and deploy so that it can run.

Console logs

✘ [ERROR] Error while preprocessing /Users/***/node_modules/@smui/chips/dist/Chip.svelte - error TS6053: File '@tsconfig/svelte/tsconfig.json' not found.
 [plugin vite-plugin-svelte:optimize-svelte]

    node_modules/@smui/chips/dist/index.js:2:17:
      2 │ import Chip from './Chip.svelte';

Desktop (please complete the following information):

  • OS: macOS Sequoia 15.2
  • Browser : Chrome
  • Version 132 (arm64)

Smartphone (please complete the following information):

  • n/a
@amarsiingh amarsiingh added the bug Something isn't working label Jan 17, 2025
@hperrin
Copy link
Owner

hperrin commented Feb 5, 2025

Svelte 5 requires typescript. The svelte-preprocess should handle it though. Are you using that plugin in Vite?

@amarsiingh
Copy link
Author

Svelte 5 requires typescript. The svelte-preprocess should handle it though. Are you using that plugin in Vite?

Yes, I'm using Typescript in our project.
My Vite config has the following bit:

ssr: {
	noExternal: [/^@material\//, /^@smui(?:-extra)?\//]
},

is that what you're asking for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants