huggingface/node-question-answering

Module not found

sujithjoseph opened this issue · 3 comments

Compilation issue - (while just importing import { QAClient } from 'question-answering'; OR
import { BertWordPieceTokenizer } from "tokenizers";

./node_modules/tokenizers/bindings/native.js
Module not found: Can't resolve '../bin-package' in '/ui/node_modules/tokenizers/bindings'

package.json

{
"name": "search-ui",
"version": "0.1.0",
"private": true,
"devDependencies": {
"@babel/core": "^7.8.4",
"react-scripts": "^3.4.0"
},
"dependencies": {
"node-fetch": "^2.6.0",
"question-answering": "^1.3.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"searchkit": "beta",
"searchkit-express": "^0.2.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

Hi @sujithjoseph, are you trying to use this package in the browser? It unfortunately only supports NodeJS given the current TensorFlowJS limitations :/

Closing this, feel free to reopen if still relevant!

Thanks Piercci for your response!