Hi, I'm encountering a blocking issue when trying to build and run the application on a Windows machine.
1. The Original Build Error
When running npm run build from app/frontend, the build fails because Rollup cannot resolve the $lib alias correctly within import.meta.glob inside src/lib/plugin-api/hostUi.ts. It generates an invalid, overly long relative path that escapes the drive root, mixed with mismatched drive letter casing (g: vs G:):
error during build:
Could not resolve "../../../../../../../../../g:/pinokio/api/potionui-pinokio.git/app/frontend/src/lib/components/ui/AdminOnlyMark.svelte" from "../../../../../../G:/pinokio/api/potionui-pinokio.git/app/frontend/src/lib/plugin-api/hostUi.ts"
file: G:/pinokio/api/potionui-pinokio.git/app/frontend/src/lib/plugin-api/hostUi.ts
at getRollupError (file:///g:/pinokio/api/potionui-pinokio.git/app/frontend/node_modules/rollup/dist/es/shared/parseAst.js:317:41)
at error (file:///g:/pinokio/api/potionui-pinokio.git/app/frontend/node_modules/rollup/dist/es/shared/parseAst.js:313:42)
This seems to be a known limitation with Vite's import.meta.glob handling path aliases ($lib/*) on Windows environments when absolute paths are resolved under the hood.
2. The Runtime Consequences
If I manually modify src/lib/plugin-api/hostUi.ts to use relative paths instead of $lib (e.g., changing $lib/components/ui/*.svelte to ../components/ui/*.svelte), the build finishes successfully.
However, at runtime (when accessing http://127.0.0), the application renders a completely blank/black screen. The browser console throws the following unhandled runtime exception:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'data')
at Module.We (B4YK0GVx.js:1:4223)
at (index):107:11
It appears that changing the globs to relative paths disrupts how components are matched, parsed, or keyed in the componentRegistry, leading to missing page components and breaking the initial SvelteKit data/page hydration flow.
Environment Details:
- OS: Windows
- Path:
G:\pinokio\api\potionui-pinokio.git\app\frontend
Could you please provide a native fix for the vite.config.ts alias resolution or restructure the glob imports in hostUi.ts so Windows users can build and load the interface correctly? Thank you!
Hi, I'm encountering a blocking issue when trying to build and run the application on a Windows machine.
1. The Original Build Error
When running
npm run buildfromapp/frontend, the build fails because Rollup cannot resolve the$libalias correctly withinimport.meta.globinsidesrc/lib/plugin-api/hostUi.ts. It generates an invalid, overly long relative path that escapes the drive root, mixed with mismatched drive letter casing (g:vsG:):error during build:
Could not resolve "../../../../../../../../../g:/pinokio/api/potionui-pinokio.git/app/frontend/src/lib/components/ui/AdminOnlyMark.svelte" from "../../../../../../G:/pinokio/api/potionui-pinokio.git/app/frontend/src/lib/plugin-api/hostUi.ts"
file: G:/pinokio/api/potionui-pinokio.git/app/frontend/src/lib/plugin-api/hostUi.ts
at getRollupError (file:///g:/pinokio/api/potionui-pinokio.git/app/frontend/node_modules/rollup/dist/es/shared/parseAst.js:317:41)
at error (file:///g:/pinokio/api/potionui-pinokio.git/app/frontend/node_modules/rollup/dist/es/shared/parseAst.js:313:42)
This seems to be a known limitation with Vite's
import.meta.globhandling path aliases ($lib/*) on Windows environments when absolute paths are resolved under the hood.2. The Runtime Consequences
If I manually modify
src/lib/plugin-api/hostUi.tsto use relative paths instead of$lib(e.g., changing$lib/components/ui/*.svelteto../components/ui/*.svelte), the build finishes successfully.However, at runtime (when accessing
http://127.0.0), the application renders a completely blank/black screen. The browser console throws the following unhandled runtime exception:Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'data')
at Module.We (B4YK0GVx.js:1:4223)
at (index):107:11
It appears that changing the globs to relative paths disrupts how components are matched, parsed, or keyed in the
componentRegistry, leading to missing page components and breaking the initial SvelteKit data/page hydration flow.Environment Details:
G:\pinokio\api\potionui-pinokio.git\app\frontendCould you please provide a native fix for the
vite.config.tsalias resolution or restructure the glob imports inhostUi.tsso Windows users can build and load the interface correctly? Thank you!