lancache-ui / frontend

MIT License
12 stars 2 forks source link

Error when starting with VITE #2

Open IIPoliII opened 1 year ago

IIPoliII commented 1 year ago

Hello,

When I try to run the front end using the : npm run dev -- command I have the following error :

failed to load config from /root/lancache-ui/frontend/vite.config.ts
error when starting dev server:
file:///root/lancache-ui/frontend/node_modules/.pnpm/@sveltejs+vite-plugin-svelte@2.0.4_svelte@3.50.1_vite@3.1.3/node_modules/@sveltejs/vite-plugin-svelte/dist/index.js:2037
import { preprocessCSS, resolveConfig, transformWithEsbuild } from "vite";
         ^^^^^^^^^^^^^
SyntaxError: The requested module 'vite' does not provide an export named 'preprocessCSS'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
    at async loadConfigFromBundledFile (file:///root/lancache-ui/frontend/node_modules/.pnpm/vite@3.1.3/node_modules/vite/dist/node/chunks/dep-557f29e6.js:63494:21)
    at async loadConfigFromFile (file:///root/lancache-ui/frontend/node_modules/.pnpm/vite@3.1.3/node_modules/vite/dist/node/chunks/dep-557f29e6.js:63380:28)
    at async resolveConfig (file:///root/lancache-ui/frontend/node_modules/.pnpm/vite@3.1.3/node_modules/vite/dist/node/chunks/dep-557f29e6.js:62997:28)
    at async createServer (file:///root/lancache-ui/frontend/node_modules/.pnpm/vite@3.1.3/node_modules/vite/dist/node/chunks/dep-557f29e6.js:62063:20)
    at async CAC.<anonymous> (file:///root/lancache-ui/frontend/node_modules/.pnpm/vite@3.1.3/node_modules/vite/dist/node/cli.js:700:24)

I did everything right with the pnpm install too. This issue is on the latest Ubuntu 22.04 LTS.

I think something is wrong just with the deleraction of Vite. But I don't know JS very well.

thomslor commented 1 year ago

Hi,

Same problem here, did you find something ?

thomslor commented 1 year ago

I found a solution, in package.json change the version of vite to 4.0.0 and svelte to 3.54.0

IIPoliII commented 1 year ago

I found a solution, in package.json change the version of vite to 4.0.0 and svelte to 3.54.0

Thanks! I was able to start it but now I get 404 errors, it looks like it doesn't know where my lancache ui service is, but I don't know where I can set to point to it correctly, any idea by any chance?

Not found: /stats
Error: Not found: /stats
    at resolve (file:///root/lancache-ui/frontend/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.589_svelte@3.54.0_vite@4.0.0/node_modules/@sveltejs/kit/src/runtime/server/index.js:380:13)
    at resolve (file:///root/lancache-ui/frontend/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.589_svelte@3.54.0_vite@4.0.0/node_modules/@sveltejs/kit/src/runtime/server/index.js:232:5)
    at Object.handle (file:///root/lancache-ui/frontend/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.589_svelte@3.54.0_vite@4.0.0/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:380:66)
    at respond (file:///root/lancache-ui/frontend/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.589_svelte@3.54.0_vite@4.0.0/node_modules/@sveltejs/kit/src/runtime/server/index.js:229:40)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///root/lancache-ui/frontend/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.589_svelte@3.54.0_vite@4.0.0/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:444:22
Not found: /stats
Error: Not found: /stats
    at resolve (file:///root/lancache-ui/frontend/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.589_svelte@3.54.0_vite@4.0.0/node_modules/@sveltejs/kit/src/runtime/server/index.js:380:13)
    at resolve (file:///root/lancache-ui/frontend/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.589_svelte@3.54.0_vite@4.0.0/node_modules/@sveltejs/kit/src/runtime/server/index.js:232:5)
    at Object.handle (file:///root/lancache-ui/frontend/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.589_svelte@3.54.0_vite@4.0.0/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:380:66)
    at respond (file:///root/lancache-ui/frontend/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.589_svelte@3.54.0_vite@4.0.0/node_modules/@sveltejs/kit/src/runtime/server/index.js:229:40)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///root/lancache-ui/frontend/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.589_svelte@3.54.0_vite@4.0.0/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:444:22
thomslor commented 1 year ago

Found on the official Discord of LanCache.NET :

If you are running the browser not on the server, put the IP of the server. Still there will be 404 errors, as I understood that the project is still WIP.

krisdahl commented 10 months ago

I'm also getting 404 errors