Error with sqlite3 install

So, I recently switched my discord bot over to a VPS (Vultr) and I am having some issues with sqlite3. Whenever I install, I get an error from node-pre-gyp and it is stopping my bot from running. I have tried the --build-from-source flag, but it is no use. I don’t know if it is because I am running node on v14 or it is the server itself. My logs are this:

> sqlite3@4.2.0 install /root/CheesyBot/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
make: Entering directory '/root/CheesyBot/node_modules/sqlite3/build'
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c
/bin/sh: 1: python: not found
make: *** [deps/ Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c] Error 127
make: Leaving directory '/root/CheesyBot/node_modules/sqlite3/build'
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:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.4.0-42-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/root/CheesyBot/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/root/CheesyBot/node_modules/sqlite3/lib/binding/node-v83-linux-x64" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /root/CheesyBot/node_modules/sqlite3
gyp ERR! node -v v14.9.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/root/CheesyBot/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/root/CheesyBot/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/root/CheesyBot/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1047:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
node-pre-gyp ERR! System Linux 5.4.0-42-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/root/CheesyBot/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /root/CheesyBot/node_modules/sqlite3
node-pre-gyp ERR! node -v v14.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/root/CheesyBot/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/root/CheesyBot/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN discord.js-commando@0.11.0-dev requires a peer of @types/better-sqlite3@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js-commando@0.11.0-dev requires a peer of better-sqlite3@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN hello-express@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! errno 1
npm ERR! sqlite3@4.2.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sqlite3@4.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-08-30T22_12_11_768Z-debug.log

Can you view the full log?

Ok, yeah. I got it. I am using node@v14.9.0 aka the latest version.

I am getting a 304 status when going to downlaod node-pre-gyp. I know it is what I am supposed to get.

The only thing I can think of is that you might have a typo somewhere.
What does the fallback-to-build flag mean?

It seems that the problem is with the actual package. I just ran npm uninstall sqlite and got the same exact result.

1 Like

After looking into the errors, I found I needed to install node-pre-gyp and after, needed to run install. Now I just need to fix up my package.json a little bit then I will be good. Found the correction, but I am getting 403 from the server.

403 means that you are forbidden from accessing the resource, what exactly are you trying to access?

It’s anAWS CDN. Sky you get 403 to an invalid link. I managed tog Ernst installed.