vishnumenon / ermine-ai

https://ermine.ai -- 100% client-side live audio transcription, powered by transformers.js
https://ermine-ai.vercel.app
MIT License
320 stars 17 forks source link

Issue while running dev mode #6

Open ShimantaBhuyan opened 1 year ago

ShimantaBhuyan commented 1 year ago

I got this error while setting up the project locally and running it:

$ npm run dev

> ermine-ai@0.1.0 dev
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
(node:17624) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
event - compiled client and server successfully in 2.5s (176 modules)
wait  - compiling /_error (client and server)...
event - compiled client and server successfully in 165 ms (177 modules)
wait  - compiling / (client and server)...
error - ./node_modules/onnxruntime-node/bin/napi-v3/darwin/arm64/onnxruntime_binding.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./node_modules/onnxruntime-node/bin/napi-v3/darwin/arm64/onnxruntime_binding.node
./node_modules/onnxruntime-node/bin/napi-v3/ sync ^\.\/.*\/.*\/onnxruntime_binding\.node$
./node_modules/onnxruntime-node/dist/binding.js
./node_modules/onnxruntime-node/dist/backend.js
./node_modules/onnxruntime-node/dist/index.js
./node_modules/@xenova/transformers/src/backends/onnx.js
./node_modules/@xenova/transformers/src/models.js
./node_modules/@xenova/transformers/src/transformers.js
./src/whisper-worker.js
./src/whisper.js
vishnumenon commented 1 year ago

I ran into this issue as well, and I'm not sure why the onnxruntime-node package is being pulled in by default -- the only fix i found was to delete node_modules and then reinstall dependencies with npm install --omit=optional --no-optional

Try that and let me know if it works!

janzheng commented 1 year ago

Looking at the ONNX site, does this mean you can only develop this with an ONNX-compatible platform like Mac M1 and M2 (I'm on an old Intel Mac), or were you able to do that?

janzheng commented 1 year ago

whoa that's goofy; I installed onnxruntime-web, then tried to npm uninstall onnxruntime-node to no avail, but if I manually deleted the folder in node_modules, it worked. For anyone else ever running into this problem... try that lol.

GDur commented 7 months ago

I am having the same issue when building it on a MacBook M1. Is there any news? Thanks