Reputation: 1
I'm using a raspberry pi 4 as well as Visual Studio Code to setup and run my bot. All of my packages were installed, except for better-sqlite3
. I tried re-installing node-gyp
(successfully installed) and then re-installing better-sqlite3 again, here is my error:
$npm i better-sqlite3
- [email protected] install /home/pi/Code/Waffles/node_modules/better-sqlite3
- prebuild-install || npm run build-release
- prebuild-install WARN install No prebuilt binaries found (target=14.15.0 runtime=node arch=arm libc= platform=linux)
- [email protected] build-release /home/pi/Code/Waffles/node_modules/better-sqlite3
- node-gyp rebuild --release
- make: Entering directory '/home/pi/Code/Waffles/node_modules/better-sqlite3/build' TOUCH b857c92884e9598d609f6be182a2595df7a8e00f.intermediate ACTION deps_sqlite3_gyp_locate_sqlite3_target_extract_sqlite3 b857c92884e9598d609f6be182a2595df7a8e00f.intermediate TOUCH Release/obj.target/deps/locate_sqlite3.stamp CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
Upvotes: 0
Views: 2360
Reputation: 415
To fix this problem, open an administrative PowerShell window, and run
npm i -g --add-python-to-path --vs2015 --production windows-build-tools
Once thats done (it may take up to 30 minutes, depending on your internet and computer speed) restart your pc, and it should work
To fix this on linux, run
sudo apt-get install build-essential
and then install better-sqlite3.
To fix this on mac, simply
- Install [XCode][1]
- Once XCode is installed, go to Preferences, Downloads, and install the Command Line Tools.
then better-sqlite should be installed correctly.
Note: I've noticed you're a new contributor, first of all, welcome to StackOverflow, second of all, be sure to mark your question as solved by clicking the check next to the answer that helped you, so people know its solved.
Upvotes: 2
Reputation: 26
That is not an error, It is the better-sqlite3 Installer, following errors could appear like this below
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-45-generic
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /media/jeremiah/Discord bot/Discord bot/node_modules/better-sqlite3
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Upvotes: 0