Skip to content

Running into an issue while using esbuild-svelte and svelte-preprocess with svelte 5 #668

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

Open
christophertrudel opened this issue Apr 24, 2025 · 0 comments

Comments

@christophertrudel
Copy link

christophertrudel commented Apr 24, 2025

Describe the bug

[ERROR] [svelte-preprocess] Encountered type error [plugin esbuild-svelte]

    node_modules/runed/dist/utilities/debounced/index.js:1:14:
      1 │ export * from "./debounced.svelte.js";
        ╵               ~~~~~~~~~~~~~~~~~~~~~~~
Image

To Reproduce
Using shadcn-svelte with live_svelte and when running the server esbuild fails with the described error. I have narrowed it down to debounced.svelte.js which contains a comment that references

<script lang="ts">

This seems to be the trigger of the issue that is likely not being properly handled in svelte-preprocess. I have created a patch package to unblock but wanted to report to see if anybody has any idea where the root cause might be?

patch:

diff --git a/node_modules/runed/dist/utilities/debounced/debounced.svelte.js b/node_modules/runed/dist/utilities/debounced/debounced.svelte.js
index c8175e7..c541c4b 100644
--- a/node_modules/runed/dist/utilities/debounced/debounced.svelte.js
+++ b/node_modules/runed/dist/utilities/debounced/debounced.svelte.js
@@ -12,7 +12,7 @@ import { noop } from "../../internal/utils/function.js";
  *
  * @example
  *
- * <script lang="ts">
+ * <script>
  *   import { Debounced } from "runed";
  *
  *   let search = $state("");

Information about your project:

System:
OS: macOS 15.1.1
CPU: (12) arm64 Apple M3 Pro
Memory: 94.34 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
pnpm: 10.9.0 - /opt/homebrew/bin/pnpm
bun: 1.2.10 - /opt/homebrew/bin/bun
Browsers:
Brave Browser: 119.1.60.114
Chrome: 135.0.7049.97
Safari: 18.1.1
npmPackages:
svelte: ^5.28.2 => 5.28.2
svelte-preprocess: ^6.0.3 => 6.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant