huggingface / node-question-answering

Fast and production-ready question answering in Node.js
Apache License 2.0
464 stars 53 forks source link

Here's what to do (It's not working anymore) #58

Closed nishantshah977 closed 4 weeks ago

nishantshah977 commented 11 months ago

This project needs massive update. There are too many conflicts with dependencies and nodejs version.

TylerSelden commented 1 month ago

An old issue, but I'd like to try to call some attention to it. Here are my specific error messages (using node v20):

$ npm i question-answering@latest
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'question-answering@3.0.0',
npm warn EBADENGINE   required: { node: '>=10 < 11 || >=12 <14' },
npm warn EBADENGINE   current: { node: 'v20.14.0', npm: '10.7.0' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'tokenizers@0.7.0',
npm warn EBADENGINE   required: { node: '>=10 < 11 || >=12 <14' },
npm warn EBADENGINE   current: { node: 'v20.14.0', npm: '10.7.0' }
npm warn EBADENGINE }
npm warn deprecated @types/minipass@3.3.5: This is a stub types definition. minipass provides its own type definitions, so you do not need this installed.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated osenv@0.1.5: This package is no longer supported.
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated npmlog@4.1.2: This package is no longer supported.
npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated gauge@2.7.4: This package is no longer supported.
npm warn deprecated node-pre-gyp@0.14.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm error code 1
npm error path /path/to/project/node_modules/tokenizers
npm error command failed
npm error command sh -c node-pre-gyp install
npm error 403 status code downloading tarball https://tokenizers-releases.s3.amazonaws.com/node/0.7.0/index-v0.7.0-node-v115-linux-x64-glibc.tar.gz
npm error node-pre-gyp info it worked if it ends with ok
npm error node-pre-gyp info using node-pre-gyp@0.14.0
npm error node-pre-gyp info using node@20.14.0 | linux | x64
npm error node-pre-gyp WARN Using needle for node-pre-gyp https download 
npm error node-pre-gyp info check checked for "/path/to/project/node_modules/tokenizers/bin-package/index.node" (not found)
npm error node-pre-gyp http GET https://tokenizers-releases.s3.amazonaws.com/node/0.7.0/index-v0.7.0-node-v115-linux-x64-glibc.tar.gz
npm error node-pre-gyp http 403 https://tokenizers-releases.s3.amazonaws.com/node/0.7.0/index-v0.7.0-node-v115-linux-x64-glibc.tar.gz
npm error node-pre-gyp ERR! install error 
npm error node-pre-gyp ERR! stack Error: 403 status code downloading tarball https://tokenizers-releases.s3.amazonaws.com/node/0.7.0/index-v0.7.0-node-v115-linux-x64-glibc.tar.gz
npm error node-pre-gyp ERR! stack     at PassThrough.<anonymous> (/path/to/project/node_modules/node-pre-gyp/lib/install.js:142:27)
npm error node-pre-gyp ERR! stack     at PassThrough.emit (node:events:531:35)
npm error node-pre-gyp ERR! stack     at ClientRequest.<anonymous> (/path/to/project/node_modules/needle/lib/needle.js:538:9)
npm error node-pre-gyp ERR! stack     at Object.onceWrapper (node:events:634:26)
npm error node-pre-gyp ERR! stack     at ClientRequest.emit (node:events:519:28)
npm error node-pre-gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:698:27)
npm error node-pre-gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
npm error node-pre-gyp ERR! stack     at TLSSocket.socketOnData (node:_http_client:540:22)
npm error node-pre-gyp ERR! stack     at TLSSocket.emit (node:events:519:28)
npm error node-pre-gyp ERR! stack     at addChunk (node:internal/streams/readable:559:12)
npm error node-pre-gyp ERR! System Linux 6.1.0-20-amd64
npm error node-pre-gyp ERR! command "/path/to/node" "/path/to/project/node_modules/.bin/node-pre-gyp" "install"
npm error node-pre-gyp ERR! cwd /path/to/project/node_modules/tokenizers
npm error node-pre-gyp ERR! node -v v20.14.0
npm error node-pre-gyp ERR! node-pre-gyp -v v0.14.0
npm error node-pre-gyp ERR! not ok

npm error A complete log of this run can be found in: /path/to/logs/2024-06-12T02_56_35_156Z-debug-0.log

Looks like it has tons of very old dependencies, and won't even begin to install on node version 20. I tried downgrading, but many dependencies simply won't install. It is a very promising project, but it definitely needs updating.

nishantshah977 commented 1 month ago

Seems like they are not maintaining it further, as issues upto 2020 are answered, but not after that

TylerSelden commented 1 month ago

That's a shame, it looked very promising.

For anybody in present or future looking for a similar alternative, I found an NPM package called @xenova/transformers, and the "question-answering" mode gives very similar functionality while maintaining simplicity and out-of-the-box usage.

nishantshah977 commented 1 month ago

Hey @TylerSelden , thank you so much for adding this package here. It's awesome and now it'll help me to create some fun projects. Thank you so much.

Updating title so it'll be easier for others to find it.