Skip to content

Critical error: onnxruntime-node 1.22.0 Impossible to use Silero and Livekit plugins #458

@juninhodeluca

Description

@juninhodeluca

Describe the bug

The error comes from these packages:

@livekit/agents-plugin-silero": "^0.5.6"
@livekit/agents-plugin-livekit": "^0.1.1"

because they are using 1.22.0 version of onnxruntime-node which has a known issue:
microsoft/onnxruntime#24770

The error blocks the install.

Solution:
A patch using 1.22.0-rev (as suggested in link) or rollback to 1.21.0 (not causing problems at all)

Relevant log output

juninho@***:~/***/apps/***-assistants$ npx pnpm install
Downloading @livekit/agents-plugin-livekit@0.1.1: 83.95 MB/83.95 MB, done
Downloading onnxruntime-node@1.22.0: 93.27 MB/93.27 MB, done
Downloading @img/sharp-libvips-linux-x64@1.0.4: 7.06 MB/7.06 MB, done
Downloading @livekit/rtc-node-linux-x64-gnu@0.13.14: 14.11 MB/14.11 MB, done
Downloading @huggingface/transformers@3.5.2: 10.25 MB/10.25 MB, done
Downloading @img/sharp-libvips-linuxmusl-x64@1.0.4: 7.20 MB/7.20 MB, done
Downloading onnxruntime-web@1.22.0-dev.20250409-89f8206ba4: 20.24 MB/20.24 MB, done
Downloading @img/sharp-libvips-linuxmusl-x64@1.1.0: 7.53 MB/7.53 MB, done
 WARN  2 deprecated subdependencies found: boolean@3.2.0, node-domexception@1.0.0
Packages: +412
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Downloading @img/sharp-libvips-linux-x64@1.1.0: 7.40 MB/7.40 MB, done
Downloading onnxruntime-node@1.21.0: 80.02 MB/80.02 MB, done
Progress: resolved 450, reused 0, downloaded 414, added 412, done
node_modules/.pnpm/onnxruntime-node@1.21.0/node_modules/onnxruntime-node: Running postinstall script...
node_modules/.pnpm/protobufjs@7.5.3/node_modules/protobufjs: Running postinstall script, done in 137ms
node_modules/.pnpm/onnxruntime-node@1.22.0/node_modules/onnxruntime-node: Running postinstall script, failed in 3s
.../node_modules/onnxruntime-node postinstall$ node ./script/install
│ Downloading https://api.nuget.org/v3-flatcontainer/microsoft.ml.onnxruntime.gpu.linux/1.22.0/microsoft.ml.onnxruntime.gpu.linux.1.22.0.nupkg
│ /home/juninho/***/apps/***-assistants/node_modules/.pnpm/onnxruntime-node@1.22.0/node_modules/onnxruntime-node/script/install-utils.js:176
│               throw new Error(`Failed to find ${pathInPackage} in NuGet package`);
│                     ^
│ Error: Failed to find runtimes/win-x64/native/libonnxruntime_providers_cuda.so in NuGet package
│     at Object.download (/home/juninho/***/apps/***-assistants/node_modules/.pnpm/onnxruntime-node@1.22.0/node_modules/onnxruntime-node/script/install-utils.js:176:21)
│     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
│     at async installPackages (/home/juninho/***/apps/***-assistants/node_modules/.pnpm/onnxruntime-node@1.22.0/node_modules/onnxruntime-node/script/install-utils.js:107:5)
│ Node.js v24.2.0
└─ Failed in 3s at /home/juninho/***/apps/***-assistants/node_modules/.pnpm/onnxruntime-node@1.22.0/node_modules/onnxruntime-node
 ELIFECYCLE  Command failed with exit code 1.

Describe your environment

The data may not be updated, since I was trying to rollback some packages to workaround the issue

  System:
    OS: Linux 6.11 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
    CPU: (8) x64 Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
    Memory: 21.24 GB / 31.27 GB
    Container: Yes
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 24.2.0 - ~/.nvm/versions/node/v24.2.0/bin/node
    npm: 11.3.0 - ~/.nvm/versions/node/v24.2.0/bin/npm
  npmPackages:
    @livekit/agents: ^0.7.6 => 0.7.6 
    @livekit/agents-plugin-openai: ^0.9.0 => 0.9.1 
    @livekit/agents-plugin-livekit: ^0.1.1 => 0.1.1 
    @livekit/agents-plugin-silero: ^0.5.6 => 0.5.6 
    @livekit/rtc-node: ^0.13.14 => 0.13.14 
    livekit-server-sdk: ^2.13.0 => 2.13.0 

Minimal reproducible example

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions