oskar-gmerek / surreal-sveltekit

A Starter Kit with SurrealDB and Svelte [ SvelteKit ], featuring Authentication and CRUD Operations + Realtime
MIT License
60 stars 3 forks source link

[Bug] - pnpm dev throws error #5

Closed var-che closed 4 months ago

var-che commented 4 months ago

After installing the app with pnpm i and making sure that my database was running, I ran pnpm dev.

It says that it is an issue:

> vite dev

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

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

Forced re-optimization of dependencies

  VITE v5.0.12  ready in 1605 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
11:01:40 PM [vite] Error when evaluating SSR module /src/master.css.ts: failed to import "@master/css"
|- Error: Cannot find module '@master/css' imported from '/home/vlada/projects/surreal-sveltekit/src/master.css.ts'
    at nodeImport (file:///home/vlada/projects/surreal-sveltekit/node_modules/.pnpm/vite@5.0.12/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:50892:25)
    at ssrImport (file:///home/vlada/projects/surreal-sveltekit/node_modules/.pnpm/vite@5.0.12/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:50799:30)
    at eval (/home/vlada/projects/surreal-sveltekit/src/master.css.ts:3:50)
    at instantiateModule (file:///home/vlada/projects/surreal-sveltekit/node_modules/.pnpm/vite@5.0.12/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:50861:15)

11:01:40 PM [vite] Error when evaluating SSR module /src/hooks.server.ts: failed to import "/src/master.css.ts"
|- Error: Cannot find module '@master/css' imported from '/home/vlada/projects/surreal-sveltekit/src/master.css.ts'
    at nodeImport (file:///home/vlada/projects/surreal-sveltekit/node_modules/.pnpm/vite@5.0.12/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:50892:25)
    at ssrImport (file:///home/vlada/projects/surreal-sveltekit/node_modules/.pnpm/vite@5.0.12/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:50799:30)
    at eval (/home/vlada/projects/surreal-sveltekit/src/master.css.ts:3:50)
    at instantiateModule (file:///home/vlada/projects/surreal-sveltekit/node_modules/.pnpm/vite@5.0.12/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:50861:15)

Error: Cannot find module '@master/css' imported from '/home/vlada/projects/surreal-sveltekit/src/master.css.ts'
    at nodeImport (file:///home/vlada/projects/surreal-sveltekit/node_modules/.pnpm/vite@5.0.12/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:50892:25)
    at ssrImport (file:///home/vlada/projects/surreal-sveltekit/node_modules/.pnpm/vite@5.0.12/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:50799:30)
    at eval (/home/vlada/projects/surreal-sveltekit/src/master.css.ts:3:50)
    at instantiateModule (file:///home/vlada/projects/surreal-sveltekit/node_modules/.pnpm/vite@5.0.12/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:50861:15) {
  code: 'ERR_MODULE_NOT_FOUND'
}

It seems like sveltekit 2.0 is not cool with master/css library, but still, this is easy to reproduce and to test with a fresh clone.

oskar-gmerek commented 4 months ago

Thanks for reporting. This is now fixed by migration to RC version of MasterCSS.