svelteness / kit-docs

Documentation integration for SvelteKit.
https://kitdocs.vercel.app
MIT License
457 stars 32 forks source link

Default install Fails #87

Closed btihen closed 10 months ago

btihen commented 1 year ago

I've tried with all three options for javascript types - always fails

❯ npm init @svelteness/kit-docs btihen_kitdocs            

✔ Default KitDocs Theme? (Y/n) · true

[kit-docs]: target directory is empty, creating new SvelteKit app.

create-svelte version 4.2.0

┌  Welcome to SvelteKit!
│
◇  Which Svelte app template?
│  Skeleton project
│
◇  Add type checking with TypeScript?
│  Yes, using JavaScript with JSDoc comments
│
◇  Select additional options (use arrow keys/space bar)
│  Add ESLint for code linting
│
└  Your project is ready!

✔ Type-checked JavaScript
  https://www.typescriptlang.org/tsconfig#checkJs

✔ ESLint
  https://github.com/sveltejs/eslint-plugin-svelte

Install community-maintained integrations:
  https://github.com/svelte-add/svelte-add

Next steps:
  1: cd btihen_kitdocs
  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

~/devel/btihen                                                  23s Node 18.15.0 erl 25.3 elixir 1.14.4-otp-25 21:01:18
wti0405@wti-grem ❯ cd btihen_kitdocs

~/devel/btihen/btihen_kitdocs                                       Node 18.15.0 erl 25.3 elixir 1.14.4-otp-25 21:01:24
wti0405@wti-grem ❯ npm install
git init && git add -A && git commit -m "Initial commit"(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠏ idealTree:btihen_kitdocs: sill idealTree npm WARN deprecated @types/lru-cache@7.10.10: This is a stub types definition. lru-cache provides its own type definitions, so you do not need this installed.

added 212 packages, and audited 213 packages in 12s

41 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

~/devel/btihen/btihen_kitdocs                                   12s Node 18.15.0 erl 25.3 elixir 1.14.4-otp-25 21:01:41

wti0405@wti-grem ❯ npm run dev -- --open

> btihen-kitdocs@0.0.1 dev
> vite dev --open

▲ [WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json]

    jsconfig.json:2:12:
      2 │   "extends": "./.svelte-kit/tsconfig.json",
        ╵              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error when starting dev server:
Error: Unexpected option config.kit.prerender.default
    at file:///Users/wti0405/devel/btihen/btihen_kitdocs/node_modules/@sveltejs/kit/src/core/config/options.js:314:12
    at file:///Users/wti0405/devel/btihen/btihen_kitdocs/node_modules/@sveltejs/kit/src/core/config/options.js:321:18
    at file:///Users/wti0405/devel/btihen/btihen_kitdocs/node_modules/@sveltejs/kit/src/core/config/options.js:321:18
    at validate_config (file:///Users/wti0405/devel/btihen/btihen_kitdocs/node_modules/@sveltejs/kit/src/core/config/index.js:108:9)
    at process_config (file:///Users/wti0405/devel/btihen/btihen_kitdocs/node_modules/@sveltejs/kit/src/core/config/index.js:80:20)
    at load_config (file:///Users/wti0405/devel/btihen/btihen_kitdocs/node_modules/@sveltejs/kit/src/core/config/index.js:72:9)
    at async sveltekit (file:///Users/wti0405/devel/btihen/btihen_kitdocs/node_modules/@sveltejs/kit/src/exports/vite/index.js:119:24)
    at async Promise.all (index 2)
    at async asyncFlatten (file:///Users/wti0405/devel/btihen/btihen_kitdocs/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:12623:16)
    at async resolveConfig (file:///Users/wti0405/devel/btihen/btihen_kitdocs/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:64022:29)
SethuSenthil commented 1 year ago

Same here, I tried it with npm and pnpm. Does anyone know a work around?

SethuSenthil commented 1 year ago

I also tried installing older demo projects and they all have the same issue

theodorCodes commented 1 year ago

Just had the same issue and found out the following:

# Quickstart with
npm init @svelteness/kit-docs mydocs

# Default KitDocs Theme? (Y/n) · true
y

# Which Svelte app template?
Skeleton project

# Your project is ready!
cd mydocs && pnpm i

# Open the svelte.config.js file
# and comment out or delete the following line:
...

  kit: {
    adapter: adapter(),

    prerender: {
      // default: true, # comment out or delete this line!
      entries: ['*'],
      handleMissingId: 'warn',
    },
  },

...

# or you can delete the entire prerender block
# as shown in the current Manual Installation, step 3

# Then
npm run dev -- --open
ckartik commented 1 year ago

@theodorCodes your suggestion works, someone should take a look at fixing this.