xenova / transformers.js

State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!
https://huggingface.co/docs/transformers.js
Apache License 2.0
10.96k stars 668 forks source link

Error when building electron application #895

Open yrraadi-io opened 3 weeks ago

yrraadi-io commented 3 weeks ago

I'm getting the following error while building my electron app with @xenova/transformers

Error: Cannot find module '../bin/napi-v3/darwin/arm64/onnxruntime_binding.node'

start script "start": "yarn build:webpack-dev && concurrently \"yarn dev-server\" \"yarn electron\""

This may not be the most descriptive, but unfortunately I cannot share more code right now, but happy to do it privately. Would appreciate any pointers as to why this issue is arising.

PS - the module does exist, I checked.

Hevia commented 2 weeks ago

I had a similar error and had to add onnxruntime-node to my dependencies in my package, which my electron building process picked up and installed (im using vite not webpack)