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

svelte5 error - $$props can not be used in runes mode #195

Closed
rotimi-best opened this issue Oct 20, 2024 · 3 comments
Closed

svelte5 error - $$props can not be used in runes mode #195

rotimi-best opened this issue Oct 20, 2024 · 3 comments

Comments

@rotimi-best
Copy link

Hi amazing team,

I just upgraded our codebase to svelte-5 and upon starting the project it throws this error:

    '    {#each additionalMetaTags as tag}\n' +
    '      <meta {...tag} />\n' +
    '    {/each}\n' +
    '  {/if}\n' +
    '\n' +
    '  {#if additionalLinkTags?.length}\n' +
    '    {#each additionalLinkTags as tag}\n' +
    '   '... 56 more characters
}
1:01:54 AM [vite] Pre-transform error: /classroomio/node_modules/.pnpm/[email protected]/node_modules/carbon-icons-svelte/lib/ChevronDown.svelte:6:16 Cannot use `$$props` in runes mode
1:01:54 AM [vite] Pre-transform error: /classroomio/node_modules/.pnpm/[email protected]/node_modules/carbon-icons-svelte/lib/TextAlignJustify.svelte:6:16 Cannot use `$$props` in runes mode
1:01:54 AM [vite] Pre-transform error: /classroomio/node_modules/.pnpm/[email protected]/node_modules/carbon-icons-svelte/lib/CloseLarge.svelte:6:16 Cannot use `$$props` in runes mode
1:01:54 AM [vite] Pre-transform error: /classroomio/node_modules/.pnpm/[email protected]/node_modules/carbon-icons-svelte/lib/MachineLearningModel.svelte:6:16 Cannot use `$$props` in runes mode
1:01:54 AM [vite] Pre-transform error: /classroomio/node_modules/.pnpm/[email protected]/node_modules/carbon-icons-svelte/lib/Forum.svelte:6:16 Cannot use `$$props` in runes mode
1:01:54 AM [vite] Pre-transform error: /classroomio/node_modules/.pnpm/[email protected]/node_modules/carbon-icons-svelte/lib/MapCenter.svelte:6:16 Cannot use `$$props` in runes mode

Steps to reproduce:

  1. Clone repo and pull changes in branch chore: [DRAFT] migrating classroomio-com to svelte5 classroomio/classroomio#504
  2. pnpm i
  3. pnpm run dev --filter=classroomio-com
  4. Open http://localhost:5174 in browser
  5. You should see a 500 error page and the console should have this error
@brunnerh
Copy link

brunnerh commented Oct 20, 2024

Please note that the compiler options affect external libraries as well.
If you enforce runes mode like this, you will, for the most part, not be able to import Svelte 3/4 libraries.

See these issue:

@rotimi-best
Copy link
Author

@brunnerh Thanks then.

I will try using dynamicCompileOptions to exclude npm packages.

@metonym
Copy link
Collaborator

metonym commented Oct 20, 2024

Thank you @brunnerh for addressing this!

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

3 participants