-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: replace @repo/ui/tsconfig.json for with-svelte template to fix errors #10437
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@DoctorRyner is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
Hi, thanks for the pR! It looks you've identified the right problem but I'm not seeing it fixed by this PR. I'm actually seeing a new error being introduced in
This makes sense since the UI package isn't a SvelteKit app itself, and doesn't generate that file. I'm not sure what the right fix is, though... |
@anthonyshew oh, really? I didn't notice the new problem. I just saw that errors are checked properly now in my IDE and that build is successful. I'm not knowledgeable and smart enough right now to figure out what the ideal fix would be, but the issue is pretty big since any person that wants to start a Svelte project with turbo will encounter it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not work for me:
┌ @repo/ui#check-types > cache miss, executing 391a8a1acb1b2721
│
│
│ > @repo/ui@0.0.0 check-types /private/tmp/svelte-test/packages/ui
│ > svelte-check --tsconfig ./tsconfig.json
│
│
│ ====================================
│ Loading svelte-check in workspace: /private/tmp/svelte-test/packages/ui
│ Getting Svelte diagnostics...
│
│ /private/tmp/svelte-test/packages/ui/tsconfig.json:1:1
│ Error: Cannot read file '/private/tmp/svelte-test/packages/ui/.svelte-kit/tsconfig.json'.
│
│
│ ====================================
│ svelte-check found 1 error and 0 warnings in 1 file
│ ELIFECYCLE Command failed with exit code 1.
│ command finished with error: command (/private/tmp/svelte-test/packages/ui) /Users/olszewski/.nvm/versions/node/v22.13.0/bin/pnpm run check-types exited
│ (1)
└────>
I do not think .svelte-kit
gets created for @repo/ui
when running svelte-package
Okay, now it seems I fixed the issue completely. Type checking works, check-types passes, build passes, everything looks nice. |
I'll be honest. I don't know how I just closed the branch and can't re-open. However, I have a different set of changes that I'm proposing to align better with what the Svelte team is letting me know to do. I've opened a new PR: #10450 EDIT: Huh? I force-pushed?...? |
### Description Inspired by @DoctorRyner in #10437, a set of changes to make TypeScript work better for the `with-svelte` example. ### Testing Instructions This set of changes works correctly in my editor. --------- Co-authored-by: Rainer Reinhardt <drryner@icloud.com>
Description
I tested it with VS Code and Helix Editor and with current config, all export/imports of files, for instance in index.ts config, will result in a false error reporting of "Module does not exist", it seems to be happening because of miss configuration.
Testing Instructions
bunx create-turbo@latest -e with-svelte
@repo/ui/src/index.ts
and check if typescript gives you any errors (it should)And check if import/export errors are gone in VS Code (it's the change made in this pull request)