Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Can't resolve '/bin-package' via webpack #13

Open
zirlman opened this issue May 18, 2020 · 3 comments
Open

Can't resolve '/bin-package' via webpack #13

zirlman opened this issue May 18, 2020 · 3 comments

Comments

@zirlman
Copy link

zirlman commented May 18, 2020

I'm trying to use this module for a chrome extension using webpack. When I run npx webpack I receive the following error:
ERROR in ./node_modules/question-answering/node_modules/tokenizers/bindings/native.js Module not found: Error: Can't resolve '/bin-package' in '....\node_modules\question-answering\node_modules\tokenizers\bindings' @ ./node_modules/question-answering/node_modules/tokenizers/bindings/native.js 1:15-38 @ ./node_modules/question-answering/node_modules/tokenizers/bindings/decoders.js @ ./node_modules/question-answering/node_modules/tokenizers/implementations/tokenizers/bert-wordpiece.tokenizer.js @ ./node_modules/question-answering/node_modules/tokenizers/implementations/tokenizers/index.js @ ./node_modules/question-answering/node_modules/tokenizers/index.js @ ./node_modules/question-answering/dist/qa.js @ ./node_modules/question-answering/dist/index.js

Is this module compatible with webpack?
P.S. If not, how can I run huggingface models using TFJS?

@Pierrci
Copy link
Member

Pierrci commented Jun 26, 2020

Unfortunately, the Tokenizers library used internally for tokenization doesn't provide bindings for the browser but only for Nodejs (see huggingface/tokenizers#63), so you can't use this library with webpack (I suppose you're trying to use it in the browser).

@franklevasseur
Copy link

huggingface/tokenizers don't seem to work on windows either:

Error, \\?\C:\Users\franc\Documents-franc\botpress-root\botpress2\modules\unsupervised_qna\node_modules\tokenizers\bin-package\index.node is not a valid Win32 application.
\\?\C:\Users\franc\Documents-franc\botpress-root\botpress2\modules\unsupervised_qna\node_modules\tokenizers\bin-package\index.node

@MeechaPooch
Copy link

SAME! THIS IS SO ANNOYING!!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants