Hello there, I'm having an issue building the UI. When ever I try to build, I get the following error. Nothing seems to fix it unless I upgrade vite, but when I do so, the UI is completely broken (for obvious reasons), I know the latest update was recent, so I'm not sure what I'm doing wrong.
yarn run v1.22.19
$ sed -i 's/true/false/g' ./src/stores/debugStore.ts && vite build
failed to load config from /var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/vite.config.ts
error during build:
file:///var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/node_modules/@sveltejs/vite-plugin-svelte/dist/index.js:630
import { createFilter } from "vite";
^^^^^^^^^^^^
SyntaxError: Named export 'createFilter' not found. The requested module 'vite' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'vite';
const { createFilter } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15)
at async loadConfigFromFile (/var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/node_modules/vite/dist/node/chunks/dep-689425f3.js:61916:31)
at async resolveConfig (/var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/node_modules/vite/dist/node/chunks/dep-689425f3.js:61456:28)
at async doBuild (/var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/node_modules/vite/dist/node/chunks/dep-689425f3.js:41564:20)
at async build (/var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/node_modules/vite/dist/node/chunks/dep-689425f3.js:41552:16)
at async CAC.<anonymous> (/var/lib/pterodactyl/volumes/c6994981-c2e1-44b2-9e1c-d9ecd5fc43e5/txData/QBCoreFramework_23A56F.base/resources/[qb-packs]/[project-sloth]/ps-hud/svelte-source/node_modules/vite/dist/node/cli.js:738:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
``
Hello there, I'm having an issue building the UI. When ever I try to build, I get the following error. Nothing seems to fix it unless I upgrade vite, but when I do so, the UI is completely broken (for obvious reasons), I know the latest update was recent, so I'm not sure what I'm doing wrong.