v3 fails on Cloudflare Workers due to Webpack publicPath missing
System Info
Automatic publicPath is not supported in this browser
https://stackoverflow.com/questions/68115467/error-automatic-publicpath-is-not-supported-in-this-browser-when-i-am-running-m Just add: output: { publicPath: '', ... },
"@huggingface/transformers": "^3.0.0-alpha.14",
Environment/Platform
- [X] Website/web-app
- [x] Browser extension
- [ ] Server-side (e.g., Node.js, Deno, Bun)
- [ ] Desktop app (e.g., Electron)
- [ ] Other (e.g., VSCode extension)
Description
Automatic publicPath is not supported in this browser
Reproduction
import { pipeline } from "@huggingface/transformers/" in cfw
https://developers.cloudflare.com/workers/wrangler/migration/v1-to-v2/wrangler-legacy/webpack/#example-with-webpack-plugin
Also encountering this error. Any status on this? Thank you.
Automatic publicPath is not supported in this browser
Is there a solution to using error reporting in plug-ins?
this bug makes it impossible to run transformers.js in v0, because we don't have access to the webpack-config, even when v0 itself thinks it can help.
do we even need to auto-detect the publicPath?
Revisiting this - does the issue still occur for Transformers.js v3.3.3?
I reproduced this with v3.3.2 in Firefox, and after updating to 3.3.3 it appears to be resolved.
It seems as though cloudflare workers are unsuitable for running Transformers.js, because (1) wasm code generation is disabled and (2) node addons aren't supported. For this reason, we'll close this issue as not planned for now... but hopefully this will be possible in future!
If anyone knows more or has any ideas, please feel free to share!
See https://github.com/huggingface/transformers.js/pull/1333#issuecomment-2988694866 for more information on what I've tried.