better-sqlite3 icon indicating copy to clipboard operation
better-sqlite3 copied to clipboard

install better-sqlite3 error

Open jackgreen12345 opened this issue 3 years ago • 2 comments

i have an error while installing better-sqlite3 on centos. the error log is that: npm ERR! code 127 npm ERR! path /root/nodejs/node-v16.9.0-linux-x64/lib/node_modules/better-sqlite3 npm ERR! command failed npm ERR! command sh -c prebuild-install || npm run build-release npm ERR! sh: prebuild-install: command not found npm ERR! sh: npm: command not found npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-11-18T07_21_26_026Z-debug.log

in fact, i have installed prebuild-install, node v16.9.0 and npm(npm -version 7.21.1),what happens to me? image

jackgreen12345 avatar Nov 18 '22 08:11 jackgreen12345

  1. How are you trying to install? Is it simply a npm i better-sqlite3? Or globally?
  2. How did you install Node.js and npm?

Something with your PATH is messed up (it should be able to find npm and also prebuild-install inside node_modules/.bin, you don't need to install it separately). This does not seem to be related to better-sqlite3. Maybe it's the way you've installed things or that you appear to run things as root.

Prinzhorn avatar Nov 18 '22 11:11 Prinzhorn

Is this still relevant? There has been no reaction for 10 months.

neoxpert avatar Sep 11 '23 21:09 neoxpert