sotch-pr35mac / syng

A free, open source, cross-platform, Chinese-To-English dictionary for desktops.
https://getsyng.com
GNU General Public License v3.0
156 stars 24 forks source link

2.0.1 beta dependencies are out of date. #195

Closed hungrymonkey closed 1 year ago

hungrymonkey commented 1 year ago

$npm install .

https://github.com/sotch-pr35mac/syng/blob/master/package.json#L49

npm ERR! code 1
npm ERR! path /home/doof/localbuild/syng-2.0.0-beta-1/node_modules/chinese-dictionary
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build=false || neon build --release
npm ERR! response status 404 Not Found on https://github.com/sotch-pr35mac/chinese-dictionary/releases/download/1.1.2/node-v102-linux-x64.tar.gz
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.7
npm ERR! node-pre-gyp info using node@17.7.1 | linux | x64
npm ERR! node-pre-gyp info check checked for "/home/doof/localbuild/syng-2.0.0-beta-1/node_modules/chinese-dictionary/native/index.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/sotch-pr35mac/chinese-dictionary/releases/download/1.1.2/node-v102-linux-x64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/sotch-pr35mac/chinese-dictionary/releases/download/1.1.2/node-v102-linux-x64.tar.gz 
npm ERR! node-pre-gyp ERR! install error 
npm ERR! node-pre-gyp ERR! stack Error: response status 404 Not Found on https://github.com/sotch-pr35mac/chinese-dictionary/releases/download/1.1.2/node-v102-linux-x64.tar.gz
npm ERR! node-pre-gyp ERR! stack     at /home/doof/localbuild/syng-2.0.0-beta-1/node_modules/@mapbox/node-pre-gyp/lib/install.js:67:15
npm ERR! node-pre-gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR! node-pre-gyp ERR! System Linux 6.0.0-rc4-1.gc26d0f0-default
npm ERR! node-pre-gyp ERR! command "/usr/bin/node17" "/home/doof/localbuild/syng-2.0.0-beta-1/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build=false"
npm ERR! node-pre-gyp ERR! cwd /home/doof/localbuild/syng-2.0.0-beta-1/node_modules/chinese-dictionary
npm ERR! node-pre-gyp ERR! node -v v17.7.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.7
npm ERR! node-pre-gyp ERR! not ok 
npm ERR! neon ERR! spawn cargo ENOENT
npm ERR! 
npm ERR! Error: spawn cargo ENOENT
npm ERR!     at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
npm ERR!     at onErrorNT (node:internal/child_process:476:16)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:83:21)

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/doof/.npm/_logs/2022-09-13T00_09_19_761Z-debug-0.log

$LSB Version: n/a Distributor ID: openSUSE Description: openSUSE Tumbleweed Release: 20220909 Codename: n/a

$npm --version 8.5.2

sotch-pr35mac commented 1 year ago

This looks like the intended behavior. The chinese-dictionary package doesn't have a prebuilt binary for your system (node-v102-linux-x64) so its falling back to building source on installation (this is the intended behavior). I believe the issue here is that your system doesn't have cargo installed, which is required to build the rust code from source. This process should by installing rust and cargo. You can do so easily with rustup. Let me know if that resolves the issue for you.

Somewhat related to your question, I see that you are running npm install. This project prefers to use the Makefile, so to get started and build from source, you would want to run:

1. make install
2. make build
3. make start-prod