kitql
kitql copied to clipboard
vite-plugin-kit-routes Error on server start
Describe the bug
- $lib/ROUTES.ts is not generated on vite.config.ts (update with import and added plugin "kitRoutes")
- error when starting dev server:
SyntaxError: Unexpected token, expected "," (14:4)
at constructor (/full/path/to/project/node_modules/.pnpm/@[email protected]/node_modules/@babel/parser/lib/index.js:356:19)
at TypeScriptParserMixin.raise (/full/path/to/project/node_modules/.pnpm/@[email protected]/node_modules/@babel/parser/lib/index.js:3223:19)
at TypeScriptParserMixin.unexpected (/full/path/to/project/node_modules/.pnpm/@[email protected]/node_modules/@babel/parser/lib/index.js:3253:16)
at TypeScriptParserMixin.expect (/full/path/to/project/node_modules/.pnpm/@[email protected]/node_modules/@babel/parser/lib/index.js:3585:28)
at TypeScriptParserMixin.parseObjectLike (/full/path/to/project/node_modules/.pnpm/@[email protected]/node_modules/@babel/parser/lib/index.js:11650:14)
at TypeScriptParserMixin.parseExprAtom (/full/path/to/project/node_modules/.pnpm/@[email protected]/node_modules/@babel/parser/lib/index.js:11155:23)
at TypeScriptParserMixin.parseExprSubscripts (/full/path/to/project/node_modules/.pnpm/@[email protected]/node_modules/@babel/parser/lib/index.js:10857:23)
at TypeScriptParserMixin.parseUpdate (/full/path/to/project/node_modules/.pnpm/@[email protected]/node_modules/@babel/parser/lib/index.js:10840:21)
at TypeScriptParserMixin.parseMaybeUnary (/full/path/to/project/node_modules/.pnpm/@[email protected]/node_modules/@babel/parser/lib/index.js:10816:23)
at TypeScriptParserMixin.parseMaybeUnary (/full/path/to/project/node_modules/.pnpm/@[email protected]/node_modules/@babel/parser/lib/index.js:9696:18)
ELIFECYCLE Command failed with exit code 1.
Severity
blocking all usage of Houdini
Steps to Reproduce the Bug
- installing the plugin:
❯ pnpm add vite-plugin-kit-routes -D
Packages: +19
+++++++++++++++++++
Progress: resolved 517, reused 494, downloaded 0, added 0, done
devDependencies:
+ vite-plugin-kit-routes 0.5.1
Done in 4.2s
- saving changes to vite.config.ts
import { sveltekit } from '@sveltejs/kit/vite';
import type { UserConfig } from 'vite';
import { imagetools } from 'vite-imagetools';
import { kitRoutes } from 'vite-plugin-kit-routes'
const config: UserConfig = {
plugins: [sveltekit(), imagetools(), kitRoutes()]
};
export default config;
- my package.json:
{
"name": "project",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"test": "playwright test",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"test:unit": "vitest",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
},
"devDependencies": {
"@playwright/test": "^1.37.1",
"@sveltejs/adapter-auto": "^1.0.3",
"@sveltejs/adapter-node": "^1.3.1",
"@sveltejs/kit": "^1.23.0",
"prisma": "^5.7.1",
"svelte": "^4.2.0",
"svelte-check": "^3.5.0",
"svelte-headless-table": "^0.18.1",
"svelte-render": "^2.0.0",
"sveltekit-superforms": "^1.6.1",
"tailwindcss": "^3.3.6",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
"vite": "^4.4.9",
"vite-imagetools": "^4.0.19",
"vite-plugin-kit-routes": "^0.5.1",
"vitest": "^0.25.8",
"zod": "^3.22.2"
},
"type": "module",
"dependencies": {
"@fontsource/brygada-1918": "^4.5.13",
"@fontsource/fira-mono": "^4.5.10",
"@picocss/pico": "^1.5.10",
"@prisma/client": "^5.7.1",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"@xstate/svelte": "^2.1.0",
"autoprefixer": "^10.4.16",
"bits-ui": "^0.13.0",
"clsx": "^2.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard-with-typescript": "^43.0.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.1",
"eslint-plugin-promise": "^6.1.1",
"formsnap": "^0.4.2",
"lucide-svelte": "^0.303.0",
"mode-watcher": "^0.1.2",
"pocketbase": "^0.20.1",
"postcss": "^8.4.32",
"postcss-load-config": "^5.0.2",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.5.10",
"sass": "^1.66.1",
"svelte-icons": "^2.1.0",
"tailwind-merge": "^2.2.0",
"tailwind-variants": "^0.1.20",
"xstate": "^4.38.2",
"zod-form-data": "^2.0.2"
}
}
Reproduction
No response
I'm not able to reproduce, could you do a repro somewhere?
Any update?
Feel free to re open if you have any update