llama-node icon indicating copy to clipboard operation
llama-node copied to clipboard

napi: not found on debian bullseye

Open loretoparisi opened this issue 2 years ago • 5 comments

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

loretoparisi avatar Sep 01 '23 10:09 loretoparisi

Any resolution to this?

BennyH26 avatar Sep 13 '23 14:09 BennyH26

Facing same issue

shashiranjan84 avatar Oct 02 '23 15:10 shashiranjan84

npm i -g node-addon-api

tchereau avatar Oct 12 '23 12:10 tchereau

Same issue in Android Termux

euporiacosmos avatar Dec 30 '23 04:12 euporiacosmos

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...

euporiacosmos avatar Jan 12 '24 11:01 euporiacosmos