npm init command to start a new kit-docs does not work
johngribbin opened this issue · 8 comments
I believe this is caused by breaking changes in Sveltekit. Is there a workaround?
See logs:
johngribbin@Johns-MacBook-Pro clams-tech % npm init @svelteness/kit-docs clams-docs
✔ Default KitDocs Theme? (Y/n) · true
[kit-docs]: target directory is empty, creating new SvelteKit app.
create-svelte version 2.0.0-next.158
Welcome to SvelteKit!
This is beta software; expect bugs and missing features.
Problems? Open an issue on https://github.com/sveltejs/kit/issues if none exists already.
✔ Which Svelte app template? › Skeleton project
✔ Add type checking with TypeScript? › Yes, using TypeScript syntax
✔ Add ESLint for code linting? … No / Yes
✔ Add Prettier for code formatting? … No / Yes
✔ Add Playwright for browser testing? … No / Yes
Your project is ready!
✔ Typescript
Inside Svelte components, use <script lang="ts">
✔ ESLint
https://github.com/sveltejs/eslint-plugin-svelte3
✔ Prettier
https://prettier.io/docs/en/options.html
https://github.com/sveltejs/prettier-plugin-svelte#options
✔ Playwright
https://playwright.dev
Install community-maintained integrations:
https://github.com/svelte-add/svelte-adders
Next steps:
1: cd clams-docs
2: npm install (or pnpm install, etc)
3: git init && git add -A && git commit -m "Initial commit" (optional)
4: npm run dev -- --open
To close the dev server, hit Ctrl-C
Stuck? Visit us at https://svelte.dev/chat
Error: ENOENT: no such file or directory, stat '/Users/johngribbin/Repos/clams-tech/clams-docs/src/routes/index.svelte'
at Object.statSync (node:fs:1538:3)
at __node_internal_ (node:internal/fs/utils:793:8)
at rmSync (node:fs:1213:13)
at main (file:///Users/johngribbin/.npm/_npx/cbc22df0399bae1c/node_modules/@svelteness/create-kit-docs/bin/create-kit-docs.js:58:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
errno: -2,
syscall: 'stat',
code: 'ENOENT',
path: '/Users/johngribbin/Repos/clams-tech/clams-docs/src/routes/index.svelte'
}
npm ERR! code 1
npm ERR! path /Users/johngribbin/Repos/clams-tech
npm ERR! command failed
npm ERR! command sh -c -- create-kit-docs clams-docs
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/johngribbin/.npm/_logs/2022-08-24T10_33_49_230Z-debug-0.log
I came to report the same issue.
I did give KitDocs a quick try previously, and hit an issue around the same point. Not sure now if it was the same, though, sorry.
Would love to be able to give it a go, as I'm creating a documentation site, and a lot of the features I was planning to add are already provided by KitDocs, so I'm keen to see if it works for my setup (it also has a few features I'm not so keen on, so interested to see how easy they are turn off).
I believe this was caused by some breaking changes with SvelteKit, mainly that the routing has changed from index.svelte files to +page.svelte. Would be good to get a timeframe for when Kit-docs will be updated to become compatible with the latest SvelteKit update.
I just had a quick look and unforunately the new naming conventinos (i.e., +page
) and few other things are pretty big breaking changes. It's broken quite a few parts of KitDocs. I'll need to find some time hopefully this weekend to dig further and resolve it.
@mihar-22 Is there anything we can do to help? Would love to start using KitDocs again.
@mihar-22 any news on this?
I had another look last night and there's quite a few things to fix which requires a couple hours I don't have right now. Not only the core fixes but I'll have to update all demo and KitDocs site itself. It's just all a bit painful right now. I'll try to get to when I can. If anyone has time you can:
git clone git@github.com:svelteness/kit-docs.git
pnpm i
rm package-lock.json
(update everything to latest)pnpm i
- Start by updating the request handlers and ensure they resolve
+page
correctly. - Update page/layout/handlers here
- Test by running
pnpm dev
after you think you've resolved everything - Go through the
create
package and fix things up there too, with respect to whatever has changed in SvelteKit. - Update
demo
to match everything that was updated in thekit-docs
directory.