huggingface / 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
12.07k stars 764 forks source link

Error: The specified procedure could not be found. #654

Open cabfile opened 8 months ago

cabfile commented 8 months ago

System Info

latest transformers.js Node.js v19.9.0

Environment/Platform

Description

the logs:

Error: The specified procedure could not be found.
\\?\D:\Folders\ProgrammingLanguages\JavaScript\Node.js\transformerstest\node_mod
ules\onnxruntime-node\bin\napi-v3\win32\x64\onnxruntime_binding.node
    at Module._extensions..node (node:internal/modules/cjs/loader:1361:18)
    at Module.load (node:internal/modules/cjs/loader:1133:32)
    at Module._load (node:internal/modules/cjs/loader:972:12)
    at Module.require (node:internal/modules/cjs/loader:1157:19)
    at require (node:internal/modules/helpers:119:18)
    at Object.<anonymous> (D:\Folders\ProgrammingLanguages\JavaScript\Node.js\tr
ansformerstest\node_modules\onnxruntime-node\dist\binding.js:9:1)
    at Module._compile (node:internal/modules/cjs/loader:1275:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
    at Module.load (node:internal/modules/cjs/loader:1133:32)
    at Module._load (node:internal/modules/cjs/loader:972:12) {
  code: 'ERR_DLOPEN_FAILED'
}

Reproduction

literally just import { pipeline } from '@xenova/transformers';

xenova commented 7 months ago

Thanks for the report. Since this looks like an issue with onnxruntime-node, I'll tag @guschmue who might be able to provide additional context. In the meantime, can you share some more information abut your environment? Could you also try upgrading to node.js v20+?

cabfile commented 7 months ago

sorry for the late response. upgraded to node v20.12.0, logs:

Error: The specified procedure could not be found.
\\?\D:\Folders\ProgrammingLanguages\JavaScript\Node.js\transformerstest2\node_mo
dules\onnxruntime-node\bin\napi-v3\win32\x64\onnxruntime_binding.node
    at Module._extensions..node (node:internal/modules/cjs/loader:1465:18)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (D:\Folders\ProgrammingLanguages\JavaScript\Node.js\tr
ansformerstest2\node_modules\onnxruntime-node\dist\binding.js:9:1)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12) {
  code: 'ERR_DLOPEN_FAILED'
}
cabfile commented 7 months ago

both windows and node are 64-bit