Pinokio
FeedApps
Download Pinokio
Sign inCreate accountJoin
Sign inCreate accountJoin

Post

Conversation

Build error on Windows due to import.meta.glob with path alias / Blank UI screen on runtime

@sharp777·1h

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!


PotionUIPotionUI/potionui-pinokio
Loading conversation…

Replies

Post context

App used

PotionUIPotionUI/potionui-pinokio

PotionUI 0.0.17: self-hosted AI image and video generation with a preset-driven interface, a native diffusers engine and ComfyUI support. Requires ...

View app

Published by

@sharp7771h ago
Pinokio
PrivacyTerms
FeedApps

Post context

App used

PotionUIPotionUI/potionui-pinokio

PotionUI 0.0.17: self-hosted AI image and video generation with a preset-driven interface, a native diffusers engine and ComfyUI support. Requires ...

View app

Published by

@sharp7771h ago

Related posts

VideoCrafter 2: error: Failed to install: sympy-1.14.0-py3-none-any.whl (sympy==1.14.0)@dukevictor · 6d agoWan2GP: ImportError: cannot import name 'ode' from partially initialized module 'scipy.integrate' (most…@adwardgreen · 1mo agoPCM: RuntimeError: Failed to import diffusers.pipelines.stable_diffusion_xl.pipeline_stable_diffusio…@deepakbaba420 · 4d ago