-
Notifications
You must be signed in to change notification settings - Fork 577
Runtime Error: onnxruntime-node Version Conflict (VERS_1.19.2 not found) in eliza-starter on LinuxΒ #157
Description
Subject: Runtime Error: onnxruntime-node Version Conflict (VERS_1.19.2 not found) in eliza-starter on Linux
Hi ElizaOS community! π
I'm trying to set up a new project using the eliza-starter repository on a DigitalOcean droplet (Ubuntu/Debian based Linux), but I'm running into a persistent runtime error after installation, and I could use some help.
Environment:
OS: Linux (Ubuntu/Debian on DigitalOcean)
Node.js: v22.14.0 (LTS) - (Initially tried v23, switched to LTS during troubleshooting)
npm: v10.9.2
Setup: Fresh clone of eliza-starter repository.
Steps Taken:
Cloned eliza-starter.
Ensured Node.js v22 LTS is active (nvm use lts/*).
Installed necessary system build dependencies (like build-essential, libcairo2-dev, libpixman-1-dev, etc.).
Added 2GB of SWAP space to prevent OOM errors.
Ran rm -rf node_modules package-lock.json for a clean install.
Ran npm install.
Ran npm run build.
Ran npm start.
Observed Behavior:
npm install completes without critical errors (though there are many ERESOLVE peer dependency warnings, especially related to Solana packages, and deprecated warnings). It takes a long time, suggesting native modules are likely being built.
npm run build completes successfully.
npm start initially seems to load settings but then crashes with the following error:
Error: /root/eliza-projects/eliza-neustart/node_modules/onnxruntime-node/bin/napi-v3/linux/x64/libonnxruntime.so.1: version `VERS_1.19.2' not found (required by /root/eliza-projects/eliza-neustart/node_modules/@huggingface/transformers/node_modules/onnxruntime-node/bin/napi-v3/linux/x64/onnxruntime_binding.node)
at Object..node (node:internal/modules/cjs/loader:1732:18)
# ... (rest of stack trace) ...
{
code: 'ERR_DLOPEN_FAILED'
}
Diagnosis / Further Info:
Running npm ls onnxruntime-node confirms that multiple versions of onnxruntime-node are installed due to different dependencies:
1.15.1 (via fastembed from @elizaos/core)
1.19.2 (via @huggingface/transformers from @elizaos/plugin-node)
1.20.1 (via echogarden and directly from @elizaos/plugin-node)
The error indicates that the .node binding file (likely loaded by @huggingface/transformers) requires a function (VERS_1.19.2) that is not present in the actual shared library (.so.1) file that gets loaded at runtime. This points to a version mismatch or conflict between the different onnxruntime-node versions pulled in.
We previously encountered similar MODULE_NOT_FOUND errors when trying to set up a project using npx @elizaos/cli create, which seemed related to native build issues and possibly the npx context. Using the eliza-starter and npm install seemed to resolve the basic build errors (like canvas, better-sqlite3), but this runtime onnxruntime-node conflict persists.
Question:
Is this a known issue with the current dependencies in eliza-starter? Is there a recommended way to resolve this onnxruntime-node version conflict, perhaps using specific versions or a different installation strategy? I'm a bit stuck on how to proceed.
Thanks a lot for any guidance! π
(I'm not a coder, so simpler explanations are appreciated if possible!)