Atome-FE / llama-node

Believe in AI democratization. llama for nodejs backed by llama-rs, llama.cpp and rwkv.cpp, work locally on your laptop CPU. support llama/alpaca/gpt4all/vicuna/rwkv model.
https://llama-node.vercel.app/
Apache License 2.0
864 stars 62 forks source link

napi: not found on debian bullseye #118

Open loretoparisi opened 1 year ago

loretoparisi commented 1 year ago

Running on docker with

root@a699235a7e4f:/app/test2# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

and

Node.js v18.0.0

I get while installing

root@a699235a7e4f:/app/test2# npm install --save llama-node
npm ERR! code 1
npm ERR! path /app/node_modules/@llama-node/core
npm ERR! command failed
npm ERR! command sh -c node scripts/postinstall.js
npm ERR! Building native module...
npm ERR! sh: 1: napi: not found
npm ERR! node:child_process:891
npm ERR!     throw err;
npm ERR!     ^
npm ERR! 
npm ERR! Error: Command failed: npm run build
npm ERR! sh: 1: napi: not found
npm ERR! 
npm ERR!     at checkExecSyncError (node:child_process:817:11)
npm ERR!     at execSync (node:child_process:888:15)
npm ERR!     at Object.<anonymous> (/app/node_modules/@llama-node/core/scripts/postinstall.js:148:5)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1105:14)
npm ERR!     at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Module._load (node:internal/modules/cjs/loader:827:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR!     at node:internal/main/run_main_module:17:47 {
npm ERR!   status: 127,
npm ERR!   signal: null,
npm ERR!   output: [
npm ERR!     null,
npm ERR!     Buffer(67) [Uint8Array] [
npm ERR!        10,  62,  32,  64, 108, 108,  97, 109,  97,  45, 110,
npm ERR!       111, 100, 101,  47,  99, 111, 114, 101,  64,  48,  46,
npm ERR!        49,  46,  54,  32,  98, 117, 105, 108, 100,  10,  62,
npm ERR!        32, 110,  97, 112, 105,  32,  98, 117, 105, 108, 100,
npm ERR!        32,  45,  45, 112, 108,  97, 116, 102, 111, 114, 109,
npm ERR!        32,  45,  45, 114, 101, 108, 101,  97, 115, 101,  10,
npm ERR!        10
npm ERR!     ],
npm ERR!     Buffer(23) [Uint8Array] [
npm ERR!       115, 104,  58,  32,  49,  58,  32,
npm ERR!       110,  97, 112, 105,  58,  32, 110,
npm ERR!       111, 116,  32, 102, 111, 117, 110,
npm ERR!       100,  10
npm ERR!     ]
npm ERR!   ],
npm ERR!   pid: 12711,
npm ERR!   stdout: Buffer(67) [Uint8Array] [
npm ERR!      10,  62,  32,  64, 108, 108,  97, 109,  97,  45, 110,
npm ERR!     111, 100, 101,  47,  99, 111, 114, 101,  64,  48,  46,
npm ERR!      49,  46,  54,  32,  98, 117, 105, 108, 100,  10,  62,
npm ERR!      32, 110,  97, 112, 105,  32,  98, 117, 105, 108, 100,
npm ERR!      32,  45,  45, 112, 108,  97, 116, 102, 111, 114, 109,
npm ERR!      32,  45,  45, 114, 101, 108, 101,  97, 115, 101,  10,
npm ERR!      10
npm ERR!   ],
npm ERR!   stderr: Buffer(23) [Uint8Array] [
npm ERR!     115, 104,  58,  32,  49,  58,  32,
npm ERR!     110,  97, 112, 105,  58,  32, 110,
npm ERR!     111, 116,  32, 102, 111, 117, 110,
npm ERR!     100,  10
npm ERR!   ]
npm ERR! }
npm ERR! 
npm ERR! Node.js v18.0.0
BennyH26 commented 1 year ago

Any resolution to this?

shashiranjan84 commented 1 year ago

Facing same issue

tchereau commented 1 year ago

npm i -g node-addon-api

euporiacosmos commented 10 months ago

Same issue in Android Termux

euporiacosmos commented 10 months ago

Same issue in Raspbian bookworm, Ubuntu 22.0.4, eventually RHEL 9... I tried on almost all OS which can run on raspberry pi... I think it's impossible to install on raspberry pi...