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

"@svelteness/kit-docs/client/components/layout/Sidebar.svelte:73:9 Unexpected character '@'" error #58

Open
stephane-klein opened this issue Jul 17, 2022 · 1 comment

Comments

@stephane-klein
Copy link
Contributor

In this fresh KitDocs project, I have @svelteness/kit-docs/client/components/layout/Sidebar.svelte:73:9 Unexpected character '@ error.

Here is how to reproduce:

$ git clone [email protected]:stephane-klein/kit-docs-playground.git
$ git checkout -b issue3 59d16ad26d358237dc1a0361641530259fdc439b
$ cd kit-docs-playground/services/kit-docs
$ pnpm install
$ pnpm run dev

Go to http://127.0.0.1:3000/, I have this error:

/home/stephane/git/github.com/stephane-klein/kit-docs-playground/services/kit-docs/node_modules/.pnpm/@[email protected][email protected]/node_modules/@svelteness/kit-docs/client/components/layout/Sidebar.svelte:73:9 Unexpected character '@' (x2)
/home/stephane/git/github.com/stephane-klein/kit-docs-playground/services/kit-docs/node_modules/.pnpm/@[email protected][email protected]/node_modules/@svelteness/kit-docs/client/components/layout/Sidebar.svelte:73:9 Unexpected character '@'
 71 |      <ul class={clsx(!search && 'mt-8', 'pb-28 992:pb-0')}>
 72 |        {#each Object.keys($config.links) as category (category)}
 73 |          {@const links = $config.links[category]}
                ^
 74 |          <li class="992:mt-10 mt-12 first:mt-0">
 75 |            {#if category !== '.'}
Function called outside component initialization
Error: Function called outside component initialization
    at get_current_component (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs:938:15)
    at Module.setContext (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs:968:5)
    at root.svelte:15:1
    at $$render (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs?v=e7fad255:1681:22)
    at Object.render (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs?v=e7fad255:1689:26)
    at render_response (file:///home/stephane/git/github.com/stephane-klein/kit-docs-playground/services/kit-docs/.svelte-kit/runtime/server/index.js:1383:27)
    at async respond_with_error (file:///home/stephane/git/github.com/stephane-klein/kit-docs-playground/services/kit-docs/.svelte-kit/runtime/server/index.js:2758:10)
    at async respond$1 (file:///home/stephane/git/github.com/stephane-klein/kit-docs-playground/services/kit-docs/.svelte-kit/runtime/server/index.js:2834:10)
    at async resolve (file:///home/stephane/git/github.com/stephane-klein/kit-docs-playground/services/kit-docs/.svelte-kit/runtime/server/index.js:3346:11)
    at async respond (file:///home/stephane/git/github.com/stephane-klein/kit-docs-playground/services/kit-docs/.svelte-kit/runtime/server/index.js:3290:20)
Function called outside component initialization
Error: Function called outside component initialization
    at get_current_component (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs:938:15)
    at Module.setContext (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs:968:5)
    at root.svelte:15:1
    at $$render (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs?v=e7fad255:1681:22)
    at Object.render (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs?v=e7fad255:1689:26)
    at render_response (file:///home/stephane/git/github.com/stephane-klein/kit-docs-playground/services/kit-docs/.svelte-kit/runtime/server/index.js:1383:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async respond_with_error (file:///home/stephane/git/github.com/stephane-klein/kit-docs-playground/services/kit-docs/.svelte-kit/runtime/server/index.js:2758:10)
    at async resolve (file:///home/stephane/git/github.com/stephane-klein/kit-docs-playground/services/kit-docs/.svelte-kit/runtime/server/index.js:3391:13)
    at async respond (file:///home/stephane/git/github.com/stephane-klein/kit-docs-playground/services/kit-docs/.svelte-kit/runtime/server/index.js:3290:20)

Versions:

$ pnpm list
Legend: production dependency, optional only, dev only

[email protected] /home/stephane/git/github.com/stephane-klein/kit-docs-playground/services/kit-docs

dependencies:
@fontsource/fira-mono 4.5.0
cookie 0.4.1

devDependencies:
@iconify-json/ri 1.1.1                @sveltejs/kit 1.0.0-next.370          clsx 1.1.1                            eslint-config-prettier 8.3.0          prettier 2.6.2                        shiki 0.10.1                          unplugin-icons 0.13.4
@sveltejs/adapter-auto 1.0.0-next.57  @svelteness/kit-docs 0.23.0           eslint 8.16.0                         eslint-plugin-svelte3 4.0.0           prettier-plugin-svelte 2.7.0          svelte 3.44.0                         vite 2.9.14

Have you an idea to fix this error?

@LowLevelLover
Copy link

I test it with sveltekit v1.0.0 and svelte v3.54.0. Everything works perfect.

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

2 participants