Repository navigation
Description
What happens
Installing genui 0.2.0 or main through BB fails while building the plugin. On bb 0.46.1:
bb plugin install git:https://github.com/ComicBit/bb-plugin-genui.git@main --yesError: install failed: frontend bundle build for "genui" failed: Build failed with 13 errors:
ui/components/sceneAssets.ts:13:7: ERROR: Could not resolve "three"
ui/components/sceneAssets.ts:14:44: ERROR: Could not resolve "three/addons/loaders/GLTFLoader.js"
ui/components/sceneAssets.ts:15:26: ERROR: Could not resolve "three/addons/loaders/HDRLoader.js"
ui/components/sceneWorld.ts:55:7: ERROR: Could not resolve "three"
ui/components/sceneWorld.ts:56:22: ERROR: Could not resolve "three/addons/lines/Line2.js"
...
v0.1.0 still installs, so marketplace users stay on 0.1.0 and can't get the new image viewer (b6e23a0).
Cause
Two packages the plugin imports at runtime are listed under devDependencies:
three, imported byui/components/sceneAssets.tsandui/components/sceneWorld.ts@shaderfrog/glsl-parser, imported bycore/glsl-parser.js
BB installs a git plugin's packages without devDependencies. In bb 0.46.1, installGitDependencies (src/services/plugins/git-plugin-dependencies.ts) runs:
npm install --prefix <plugin dir> --ignore-scripts --omit=dev --omit=optional --no-audit --no-fundThe other devDependencies the code imports (clsx, tailwind-merge, class-variance-authority, sonner, the radix dialog, better-sqlite3, the SDK) don't break the build: none of them gets installed and the build still passes, so BB supplies them itself. A local checkout has every devDependency installed, which is probably why this doesn't show up in development.
Reproduced outside BB's install
Each checkout got the npm install command above, then bb plugin build (bb 0.46.1):
| Variant | Build | Unresolved imports |
|---|---|---|
v0.2.0 as published (d26bf88) |
✗ exit 1 | @shaderfrog/glsl-parser ×2 |
main as published (12acfd6) |
✗ exit 1 | @shaderfrog/glsl-parser ×2 |
main, glsl-parser moved to dependencies (12acfd6) |
✗ exit 1 | three ×13 |
main, both moved to dependencies (12acfd6) |
✓ exit 0 | none |
v0.2.0, both moved to dependencies (d26bf88) |
✓ exit 0 | none |
bb plugin build stops at the glsl-parser errors; BB's install reports the 13 three errors from the frontend bundle instead.
Fix
Move both packages to dependencies:
--- a/package.json
+++ b/package.json
@@ -33,6 +33,8 @@
"dependencies": {
"@radix-ui/react-checkbox": "^1.3.7",
"@radix-ui/react-slot": "^1.3.0",
+ "@shaderfrog/glsl-parser": "^7.0.1",
+ "three": "^0.186.1",
"zod": "^4.6.5"
},
"devDependencies": {
@@ -48,7 +50,6 @@
"@radix-ui/react-popover": "^1.1.19",
"@radix-ui/react-select": "^2.3.3",
"@radix-ui/react-tooltip": "^1.2.12",
- "@shaderfrog/glsl-parser": "^7.0.1",
"@testing-library/react": "^16.3.3",
"@types/better-sqlite3": "^7.6.12",
"@types/node": "^22.0.0",
@@ -64,7 +65,6 @@
"playwright-core": "1.63.0",
"sonner": "^1.7.4",
"tailwind-merge": "^3.4.0",
- "three": "^0.186.1",
"typescript": "^5.7.0",
"vaul": "^1.1.2",
"vitest": "^4.1.11"Then run npm install to update package-lock.json. To reach marketplace users, this also needs a new tag and a bump of the bb-community listing, which still pins ^0.1.0.
Activity
ComicBit commentedon Oct 20, 2026
Fixed in 0.2.5 (da56158):
threeand@shaderfrog/glsl-parserare nowdependencies, so BB'snpm install --omit=devbrings them in and the build resolves them. Thanks for the report and the diagnosis in #8.If an update to 0.2.x failed for you, run it again: