Hi,
I wanted to create an embedding on each trigger using the “@xenova/transformers” package.
I added it as a dependency (v 2.14.2) and tried importing it both as ES6-module and as Node’s require with same error.
The error is:
> ran at Thu Feb 01 2024 11:40:33 GMT+0100 (Central European Standard Time)
> error:
failed to execute source for 'node_modules/@xenova/transformers/src/transformers.js': FunctionError: failed to execute source for 'node_modules/@xenova/transformers/src/pipelines.js': FunctionError: failed to execute source for 'node_modules/@xenova/transformers/src/tokenizers.js': FunctionError: failed to execute source for 'node_modules/@xenova/transformers/src/utils/hub.js': FunctionError: Cannot find module 'stream/web'
at require (native)
at node_modules/@xenova/transformers/src/utils/hub.js:18:35(77)
at require (native)
at node_modules/@xenova/transformers/src/tokenizers.js:15:12(195)
at require (native)
at node_modules/@xenova/transformers/src/pipelines.js:15:19(132)
at require (native)
at node_modules/@xenova/transformers/src/transformers.js:13:18(20)
at require (native)
at function.js:3:21(6)
at <eval>:12:8(5)
at <eval>:2:15(7)
at native
at require (native)
at node_modules/@xenova/transformers/src/tokenizers.js:15:12(195)
at require (native)
at node_modules/@xenova/transformers/src/pipelines.js:15:19(132)
at require (native)
at node_modules/@xenova/transformers/src/transformers.js:13:18(20)
at require (native)
at function.js:3:21(6)
at <eval>:12:8(5)
at <eval>:2:15(7)
at native
at require (native)
at node_modules/@xenova/transformers/src/pipelines.js:15:19(132)
at require (native)
at node_modules/@xenova/transformers/src/transformers.js:13:18(20)
at require (native)
at function.js:3:21(6)
at <eval>:12:8(5)
at <eval>:2:15(7)
at native
at require (native)
at node_modules/@xenova/transformers/src/transformers.js:13:18(20)
at require (native)
at function.js:3:21(6)
at <eval>:12:8(5)
at <eval>:2:15(7)
at native
It seems it cannot find “stream/web” module. I looked at your JS-support page of modules and “stream” is marked as supported.
Any idea how I can make it read the stream-module? Thanks in advance.