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

Doesn't work with bun #2

Open
zx8086 opened this issue Sep 17, 2024 · 0 comments
Open

Doesn't work with bun #2

zx8086 opened this issue Sep 17, 2024 · 0 comments

Comments

@zx8086
Copy link

zx8086 commented Sep 17, 2024

Bun 1.27

bun run dev
$ concurrently "bun run web" "bun run api" -n "web,api" -c "green,magenta"
[web] $ vite dev
[api] $ node api.mjs
[api] Server is running on http://localhost:4000/graphql
[web]
[web] 🎩 Generating runtime...
[web] 📃 Unchanged: 8
[web] Forced re-optimization of dependencies
[web]
[web] VITE v4.5.5 ready in 972 ms
[web]
[web] ➜ Local: http://localhost:5173/
[web] ➜ Network: use --host to expose
[web] error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
[web] Use 'verbatimModuleSyntax' instead.
[web] error TS5102: Option 'preserveValueImports' has been removed. Please remove it from your configuration.
[web] Use 'verbatimModuleSyntax' instead.
[web]
[web] Internal server error: Error while preprocessing /Users/SOwusu/WebstormProjects/example-sveltekit-todo/src/routes/[filter]/+page.svelte - [svelte-preprocess] Encountered type error
[web] Plugin: vite-plugin-svelte
[web] File: /Users/SOwusu/WebstormProjects/example-sveltekit-todo/src/routes/[filter]/+page.svelte
[web] at throwError (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/modules/errors.js:5:11)
[web] at throwTypescriptError (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/modules/errors.js:9:28)
[web] at transpileTs (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/transformers/typescript.js:215:47)
[web] at simpleTranspiler (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/transformers/typescript.js:306:60)
[web] at transformer (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/transformers/typescript.js:353:11)
[web] at transform (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/autoProcess.js:46:12)
[web] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[web] at async /Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/autoProcess.js:117:29
[web] at async script (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/autoProcess.js:147:33)
[web] at async process_single_tag (file:///Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte/compiler.mjs:44312:27)
[web] {
[web] name: 'Error',
[web] id: '/Users/SOwusu/WebstormProjects/example-sveltekit-todo/src/routes/[filter]/+page.svelte',
[web] message: 'Error while preprocessing /Users/SOwusu/WebstormProjects/example-sveltekit-todo/src/routes/[filter]/+page.svelte - [svelte-preprocess] Encountered type error',
[web] frame: '',
[web] code: undefined,
[web] stack: 'Error: Error while preprocessing /Users/SOwusu/WebstormProjects/example-sveltekit-todo/src/routes/[filter]/+page.svelte - [svelte-preprocess] Encountered type error\n' +
[web] ' at throwError (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/modules/errors.js:5:11)\n' +
[web] ' at throwTypescriptError (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/modules/errors.js:9:28)\n' +
[web] ' at transpileTs (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/transformers/typescript.js:215:47)\n' +
[web] ' at simpleTranspiler (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/transformers/typescript.js:306:60)\n' +
[web] ' at transformer (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/transformers/typescript.js:353:11)\n' +
[web] ' at transform (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/autoProcess.js:46:12)\n' +
[web] ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
[web] ' at async /Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/autoProcess.js:117:29\n' +
[web] ' at async script (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/autoProcess.js:147:33)\n' +
[web] ' at async process_single_tag (file:///Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte/compiler.mjs:44312:27)',
[web] plugin: 'vite-plugin-svelte',
[web] pluginCode: '<script lang="ts">import { NewItemStore } from "$houdini/plugins/houdini-svelte/stores/NewItem";\n' +
[web] 'import { AddItemStore } from "$houdini/plugins/houdini-svelte/stores/AddItem";\n' +
[web] 'import { page } from "$app/stores";\n' +
[web] 'import { graphql } from "$houdini";\n' +
[web] 'import ItemEntry from "$lib/ItemEntry.svelte";\n' +
[web] 'import { derived } from "svelte/store";\n' +
[web] 'import type { PageData } from "./$houdini";\n' +
[web] 'export let data: PageData;\n' +
[web] '\n' +
[web] 'let {\n' +
[web] ' AllItems\n' +
[web] '} = data;\n' +
[web] '\n' +
[web] '$:\n' +
[web] '({\n' +
[web] ' AllItems\n' +
[web] '} = data);\n' +
[web] '\n' +
[web] 'const addItem = new AddItemStore();\n' +
[web] 'const subscription = new NewItemStore();\n' +
[web] '\n' +
[web] '$:\n' +
[web] 'subscription.listen();\n' +
[web] '\n' +
[web] '$:\n' +
[web] 'numberOfItems = $AllItems.data?.allItems.edges.length || 0;\n' +
[web] '\n' +
[web] '$:\n' +
[web] 'itemsLeft = $AllItems.data?.allItems.edges.filter((\n' +
[web] ' {\n' +
[web] ' node: item\n' +
[web] ' }\n' +
[web] ') => !item?.completed).length;\n' +
[web] '\n' +
[web] 'const currentPage = derived(page, $page => {\n' +
[web] ' if ($page.url.pathname.includes("active")) {\n' +
[web] ' return "active";\n' +
[web] ' } else if ($page.url.pathname.includes("completed")) {\n' +
[web] ' return "completed";\n' +
[web] ' }\n' +
[web] '\n' +
[web] ' return "all";\n' +
[web] '});\n' +
[web] '\n' +
[web] 'let inputValue = "";\n' +
[web] '\n' +
[web] 'async function addInput() {\n' +
[web] ' if (inputValue) {\n' +
[web] ' await addItem.mutate({\n' +
[web] ' input: {\n' +
[web] ' text: inputValue\n' +
[web] ' }\n' +
[web] ' });\n' +
[web] '\n' +
[web] ' inputValue = "";\n' +
[web] ' }\n' +
[web] '}</script>\n' +
[web] '\n' +
[web] '

\n' +
[web] '\t\n' +
[web] '\t\t

todos

\n' +
[web] '\t
\n' +
[web] '\t{#if $AllItems.pageInfo.hasNextPage}\n' +
[web] '\t\t\n' +
[web] '\t\t\t<button on:click={() => AllItems.loadNextPage()}>load more\n' +
[web] '\t\t\n' +
[web] '\t{/if}\n' +
[web] '\t<input\n' +
[web] '\t\tclass="new-todo"\n' +
[web] '\t\tplaceholder="What needs to be done?"\n' +
[web] '\t\tbind:value={inputValue}\n' +
[web] '\t\ton:blur={addInput}\n' +
[web] '\t\ton:keyup={(event) => {\n' +
[web] "\t\t\tif (event.key === 'Enter') {\n" +
[web] '\t\t\t\taddInput()\n' +
[web] '\t\t\t}\n' +
[web] '\t\t}}\n' +
[web] '\t/>\n' +
[web] '\n' +
[web] '
\n' +
[web] '\t\n' +
[web] '\tMark all as complete\n' +
[web] '\t
    \n' +
    [web] '\t\t{#each $AllItems.data?.filteredItems.edges ?? [] as edge (edge.node?.id)}\n' +
    [web] '\t\t\t\n' +
    [web] '\t\t{/each}\n' +
    [web] '\t
\n' +
[web] '
\n' +
[web] '{#if numberOfItems > 0}\n' +
[web] '\t\n' +
[web] '\t\t{itemsLeft} item left\n' +
[web] '\t\t
    \n' +
    [web] '\t\t\t
  • \n' +
    [web] \t\t\t\t<a class:selected={$currentPage === 'all'} class="selected" href="/">All</a>\n +
    [web] '\t\t\t
  • \n' +
    [web] '\t\t\t
  • \n' +
    [web] \t\t\t\t<a class:selected={$currentPage === 'active'} href="/active">Active</a>\n +
    [web] '\t\t\t
  • \n' +
    [web] '\t\t\t
  • \n' +
    [web] \t\t\t\t<a class:selected={$currentPage === 'completed'} href="/completed">Completed</a>\n +
    [web] '\t\t\t
  • \n' +
    [web] '\t\t
\n' +
[web] '\t\n' +
[web] '{/if}\n' +
[web] '\n' +
[web] '<style>\n' +
[web] '\tnav {\n' +
[web] '\t\tposition: absolute;\n' +
[web] '\t\tright: 0;\n' +
[web] '\t\ttop: -30px;\n' +
[web] '\t}\n' +
[web] '\n' +
[web] '\tbutton {\n' +
[web] '\t\tborder: 1px solid darkgray;\n' +
[web] '\t\tborder-radius: 3px;\n' +
[web] '\t\tpadding: 4px;\n' +
[web] '\t\tbackground: white;\n' +
[web] '\t\tcursor: pointer;\n' +
[web] '\t}\n' +
[web] '\n' +
[web] '\tbutton:active {\n' +
[web] '\t\tbackground: #f6f6f6;\n' +
[web] '\t}\n' +
[web] '</style>\n'
[web] }
[web] error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
[web] Use 'verbatimModuleSyntax' instead.
[web] error TS5102: Option 'preserveValueImports' has been removed. Please remove it from your configuration.
[web] Use 'verbatimModuleSyntax' instead.
[web]
[web] Internal server error: Error while preprocessing /Users/SOwusu/WebstormProjects/example-sveltekit-todo/src/routes/[filter]/+page.svelte - [svelte-preprocess] Encountered type error
[web] Plugin: vite-plugin-svelte
[web] File: /Users/SOwusu/WebstormProjects/example-sveltekit-todo/src/routes/[filter]/+page.svelte
[web] at throwError (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/modules/errors.js:5:11)
[web] at throwTypescriptError (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/modules/errors.js:9:28)
[web] at transpileTs (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/transformers/typescript.js:215:47)
[web] at simpleTranspiler (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/transformers/typescript.js:306:60)
[web] at transformer (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/transformers/typescript.js:353:11)
[web] at transform (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/autoProcess.js:46:12)
[web] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[web] at async /Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/autoProcess.js:117:29
[web] at async script (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/autoProcess.js:147:33)
[web] at async process_single_tag (file:///Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte/compiler.mjs:44312:27)
[web] {
[web] name: 'Error',
[web] id: '/Users/SOwusu/WebstormProjects/example-sveltekit-todo/src/routes/[filter]/+page.svelte',
[web] message: 'Error while preprocessing /Users/SOwusu/WebstormProjects/example-sveltekit-todo/src/routes/[filter]/+page.svelte - [svelte-preprocess] Encountered type error',
[web] frame: '',
[web] code: undefined,
[web] stack: 'Error: Error while preprocessing /Users/SOwusu/WebstormProjects/example-sveltekit-todo/src/routes/[filter]/+page.svelte - [svelte-preprocess] Encountered type error\n' +
[web] ' at throwError (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/modules/errors.js:5:11)\n' +
[web] ' at throwTypescriptError (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/modules/errors.js:9:28)\n' +
[web] ' at transpileTs (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/transformers/typescript.js:215:47)\n' +
[web] ' at simpleTranspiler (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/transformers/typescript.js:306:60)\n' +
[web] ' at transformer (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/transformers/typescript.js:353:11)\n' +
[web] ' at transform (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/autoProcess.js:46:12)\n' +
[web] ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
[web] ' at async /Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/autoProcess.js:117:29\n' +
[web] ' at async script (/Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte-preprocess/dist/autoProcess.js:147:33)\n' +
[web] ' at async process_single_tag (file:///Users/SOwusu/WebstormProjects/example-sveltekit-todo/node_modules/svelte/compiler.mjs:44312:27)',
[web] plugin: 'vite-plugin-svelte',
[web] pluginCode: '<script lang="ts">import { NewItemStore } from "$houdini/plugins/houdini-svelte/stores/NewItem";\n' +
[web] 'import { AddItemStore } from "$houdini/plugins/houdini-svelte/stores/AddItem";\n' +
[web] 'import { page } from "$app/stores";\n' +
[web] 'import { graphql } from "$houdini";\n' +
[web] 'import ItemEntry from "$lib/ItemEntry.svelte";\n' +
[web] 'import { derived } from "svelte/store";\n' +
[web] 'import type { PageData } from "./$houdini";\n' +
[web] 'export let data: PageData;\n' +
[web] '\n' +
[web] 'let {\n' +
[web] ' AllItems\n' +
[web] '} = data;\n' +
[web] '\n' +
[web] '$:\n' +
[web] '({\n' +
[web] ' AllItems\n' +
[web] '} = data);\n' +
[web] '\n' +
[web] 'const addItem = new AddItemStore();\n' +
[web] 'const subscription = new NewItemStore();\n' +
[web] '\n' +
[web] '$:\n' +
[web] 'subscription.listen();\n' +
[web] '\n' +
[web] '$:\n' +
[web] 'numberOfItems = $AllItems.data?.allItems.edges.length || 0;\n' +
[web] '\n' +
[web] '$:\n' +
[web] 'itemsLeft = $AllItems.data?.allItems.edges.filter((\n' +
[web] ' {\n' +
[web] ' node: item\n' +
[web] ' }\n' +
[web] ') => !item?.completed).length;\n' +
[web] '\n' +
[web] 'const currentPage = derived(page, $page => {\n' +
[web] ' if ($page.url.pathname.includes("active")) {\n' +
[web] ' return "active";\n' +
[web] ' } else if ($page.url.pathname.includes("completed")) {\n' +
[web] ' return "completed";\n' +
[web] ' }\n' +
[web] '\n' +
[web] ' return "all";\n' +
[web] '});\n' +
[web] '\n' +
[web] 'let inputValue = "";\n' +
[web] '\n' +
[web] 'async function addInput() {\n' +
[web] ' if (inputValue) {\n' +
[web] ' await addItem.mutate({\n' +
[web] ' input: {\n' +
[web] ' text: inputValue\n' +
[web] ' }\n' +
[web] ' });\n' +
[web] '\n' +
[web] ' inputValue = "";\n' +
[web] ' }\n' +
[web] '}</script>\n' +
[web] '\n' +
[web] '\n' +
[web] '\t\n' +
[web] '\t\t

todos

\n' +
[web] '\t
\n' +
[web] '\t{#if $AllItems.pageInfo.hasNextPage}\n' +
[web] '\t\t\n' +
[web] '\t\t\t<button on:click={() => AllItems.loadNextPage()}>load more\n' +
[web] '\t\t\n' +
[web] '\t{/if}\n' +
[web] '\t<input\n' +
[web] '\t\tclass="new-todo"\n' +
[web] '\t\tplaceholder="What needs to be done?"\n' +
[web] '\t\tbind:value={inputValue}\n' +
[web] '\t\ton:blur={addInput}\n' +
[web] '\t\ton:keyup={(event) => {\n' +
[web] "\t\t\tif (event.key === 'Enter') {\n" +
[web] '\t\t\t\taddInput()\n' +
[web] '\t\t\t}\n' +
[web] '\t\t}}\n' +
[web] '\t/>\n' +
[web] '\n' +
[web] '
\n' +
[web] '\t\n' +
[web] '\tMark all as complete\n' +
[web] '\t
    \n' +
    [web] '\t\t{#each $AllItems.data?.filteredItems.edges ?? [] as edge (edge.node?.id)}\n' +
    [web] '\t\t\t\n' +
    [web] '\t\t{/each}\n' +
    [web] '\t
\n' +
[web] '
\n' +
[web] '{#if numberOfItems > 0}\n' +
[web] '\t\n' +
[web] '\t\t{itemsLeft} item left\n' +
[web] '\t\t
    \n' +
    [web] '\t\t\t
  • \n' +
    [web] \t\t\t\t<a class:selected={$currentPage === 'all'} class="selected" href="/">All</a>\n +
    [web] '\t\t\t
  • \n' +
    [web] '\t\t\t
  • \n' +
    [web] \t\t\t\t<a class:selected={$currentPage === 'active'} href="/active">Active</a>\n +
    [web] '\t\t\t
  • \n' +
    [web] '\t\t\t
  • \n' +
    [web] \t\t\t\t<a class:selected={$currentPage === 'completed'} href="/completed">Completed</a>\n +
    [web] '\t\t\t
  • \n' +
    [web] '\t\t
\n' +
[web] '\t\n' +
[web] '{/if}\n' +
[web] '\n' +
[web] '<style>\n' +
[web] '\tnav {\n' +
[web] '\t\tposition: absolute;\n' +
[web] '\t\tright: 0;\n' +
[web] '\t\ttop: -30px;\n' +
[web] '\t}\n' +
[web] '\n' +
[web] '\tbutton {\n' +
[web] '\t\tborder: 1px solid darkgray;\n' +
[web] '\t\tborder-radius: 3px;\n' +
[web] '\t\tpadding: 4px;\n' +
[web] '\t\tbackground: white;\n' +
[web] '\t\tcursor: pointer;\n' +
[web] '\t}\n' +
[web] '\n' +
[web] '\tbutton:active {\n' +
[web] '\t\tbackground: #f6f6f6;\n' +
[web] '\t}\n' +
[web] '</style>\n'
[web] }

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