安装moltbot(未成功)

repo:moltbot/moltbot: Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

源码安装:

复制代码
git clone https://github.com/moltbot/moltbot.git
cd moltbot

pnpm install
pnpm ui:build # auto-installs UI deps on first run
pnpm build

pnpm moltbot onboard --install-daemon

# Dev loop (auto-reload on TS changes)
pnpm gateway:watch

install输出

复制代码
pnpm install
Scope: all 31 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +4
++++
Progress: resolved 4, reused 0, downloaded 0, added 0, done

╭ Warning ───────────────────────────────────────────────────────────────────────────────────╮
│                                                                                            │
│   Ignored build scripts: core-js, node-llama-cpp.                                          │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.   │
│                                                                                            │
╰────────────────────────────────────────────────────────────────────────────────────────────╯

. postinstall$ node scripts/postinstall.js
└─ Done in 212ms
Done in 6.9s using pnpm v10.23.0
skywalk@ubjail1:~/github/moltbot$ pnpm ui:build # auto-installs UI deps on first run

> moltbot@2026.1.27-beta.1 ui:build /home/skywalk/github/moltbot
> node scripts/ui.js build


> moltbot-control-ui@ build /home/skywalk/github/moltbot/ui
> vite build

vite v7.3.1 building client environment for production...
✓ 119 modules transformed.
../dist/control-ui/index.html                   0.52 kB │ gzip:  0.31 kB
../dist/control-ui/assets/index-BAFzd9IE.css   74.85 kB │ gzip: 13.14 kB
../dist/control-ui/assets/index-CxUwHlqZ.js   355.58 kB │ gzip: 94.74 kB │ map: 1,001.50 kB
✓ built in 6.08s

ui build

复制代码
pnpm ui:build # auto-installs UI deps on first run

> moltbot@2026.1.27-beta.1 ui:build /home/skywalk/github/moltbot
> node scripts/ui.js build


> moltbot-control-ui@ build /home/skywalk/github/moltbot/ui
> vite build

vite v7.3.1 building client environment for production...
✓ 119 modules transformed.
../dist/control-ui/index.html                   0.52 kB │ gzip:  0.31 kB
../dist/control-ui/assets/index-BAFzd9IE.css   74.85 kB │ gzip: 13.14 kB
../dist/control-ui/assets/index-CxUwHlqZ.js   355.58 kB │ gzip: 94.74 kB │ map: 1,001.50 kB
✓ built in 6.08s
✓ 119 modules transformed.
../dist/control-ui/index.html                   0.52 kB │ gzip:  0.31 kB
../dist/control-ui/assets/index-BAFzd9IE.css   74.85 kB │ gzip: 13.14 kB
../dist/control-ui/assets/index-CxUwHlqZ.js   355.58 kB │ gzip: 94.74 kB │ map: 1,001.50 kB
✓ built in 5.98s

build

复制代码
pnpm build

就报错了,而且问题没有解决。

先搁置。

调试

直接npm安装,但是安装完没有moltbot命令

复制代码
npm install -g moltbot@latest
# or: pnpm add -g moltbot@latest

moltbot onboard --install-daemon

不知道啥原因,只好源码安装

build报错:A2UI bundling failed. Re-run with: pnpm canvas:a2ui:bundle

复制代码
moltbuild 报错:pnpm build
> moltbot-control-ui@ build /home/skywalk/github/moltbot/ui
> moltbot@2026.1.27-beta.1 build /home/skywalk/github/moltbot
> pnpm canvas:a2ui:bundle && tsc -p tsconfig.json && node --import tsx scripts/canvas-a2ui-copy.ts && node --import tsx scripts/copy-hook-metadata.ts && node --import tsx scripts/write-build-info.ts


> moltbot@2026.1.27-beta.1 canvas:a2ui:bundle /home/skywalk/github/moltbot
> bash scripts/bundle-a2ui.sh


 ERROR  Build failed with 1 error:

[UNRESOLVED_ENTRY] Error: Cannot resolve entry module apps/shared/MoltbotKit/Tools/CanvasA2UI/bootstrap.js.


    at aggregateBindingErrorsIntoJsError (node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/bindingify-input-options-Cb-01HR1.mjs:621:18)
    at unwrapBindingResult (node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/bindingify-input-options-Cb-01HR1.mjs:591:128)
    at #build (node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/shared/rolldown-build-KB1YaNe-.mjs:2360:34)
    at async bundleInner (node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/cli.mjs:1397:49)
    at async bundleWithConfig (node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/cli.mjs:1311:7)
    at async main (node_modules/.pnpm/rolldown@1.0.0-rc.1/node_modules/rolldown/dist/cli.mjs:1569:3)

A2UI bundling failed. Re-run with: pnpm canvas:a2ui:bundle
If this persists, verify pnpm deps and try again.
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Command failed with exit code 1.

清除缓存并重新安装

复制代码
pnpm store prune
rm -rf node_modules .pnpm-store
pnpm install

不行

pnpm安装报错ERR_PNPM_NO_GLOBAL_BIN_DIR  Unable to find the global bin directory

用的这条命令:

复制代码
pnpm add -g moltbot@latest

pnpm add -g moltbot@latest

ERR_PNPM_NO_GLOBAL_BIN_DIR  Unable to find the global bin directory

Run "pnpm setup" to create it automatically, or set the global-bin-dir setting, or the PNPM_HOME env variable. The global bin directory should be in the PATH.

按照提示,执行

复制代码
pnpm setup

这个报错问题就解决了。