Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
fix(build): retry recursive rm in decoder copy so deploy builds survive ENOTEMPTY
nirholas993e1c96bd5e
diff --git a/scripts/copy-three-decoders.mjs b/scripts/copy-three-decoders.mjsindex 8a122a423..5777c506c 100644--- a/scripts/copy-three-decoders.mjs+++ b/scripts/copy-three-decoders.mjs@@ -17,6 +17,14 @@ const repo = resolve(__dirname, '..');const src = join(repo, 'node_modules/three/examples/jsm/libs');const out = join(repo, 'public/three');+// Recursive rm races with the directory walk on overlay/network filesystems+// (codespaces, deploy worktrees with hardlinked node_modules) and throws+// ENOTEMPTY. Node retries those internally, but only when maxRetries is set —+// it defaults to 0. Without this a deploy build dies in prebuild.+function rmDir(dir) {+ rmSync(dir, { recursive: true, force: true, maxRetries: 10, retryDelay: 100 });+}+if (!existsSync(src)) {console.warn(`[copy-three-decoders] ${src} not found — skipping. Run npm install first.`);process.exit(0);@@ -37,7 +45,7 @@ const dracoDests = [join(out, 'draco'), join(repo, 'public/scene-studio/draco')]if (existsSync(dracoSrc)) {for (const dracoOut of dracoDests) {mkdirSync(dirname(dracoOut), { recursive: true });- rmSync(dracoOut, { recursive: true, force: true });+ rmDir(dracoOut);cpSync(dracoSrc, dracoOut, { recursive: true });console.log(`[copy-three-decoders] draco/ → ${dracoOut.replace(repo + '/', '')}`);}@@ -50,7 +58,7 @@ const basisSrc = join(src, 'basis');const basisOut = join(out, 'basis');if (existsSync(basisSrc)) {mkdirSync(dirname(basisOut), { recursive: true });- rmSync(basisOut, { recursive: true, force: true });+ rmDir(basisOut);cpSync(basisSrc, basisOut, { recursive: true });console.log(`[copy-three-decoders] basis/ → ${basisOut.replace(repo + '/', '')}`);} else {