Discord Bot goes down every day for exactly the same error

/rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/bindings/1.5.0/node_modules/bindings/bindings.js:135

throw err;

^

Error: Could not locate the bindings file. Tried:

→ /rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/build/better_sqlite3.node

→ /rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/build/Debug/better_sqlite3.node

→ /rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/build/Release/better_sqlite3.node

→ /rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/out/Debug/better_sqlite3.node

→ /rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/Debug/better_sqlite3.node

→ /rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/out/Release/better_sqlite3.node

→ /rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/Release/better_sqlite3.node

→ /rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/build/default/better_sqlite3.node

→ /rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/compiled/12.0.0/linux/x64/better_sqlite3.node

→ /rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/addon-build/release/install-root/better_sqlite3.node

→ /rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/addon-build/debug/install-root/better_sqlite3.node

→ /rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/addon-build/default/install-root/better_sqlite3.node

→ /rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/lib/binding/node-v72-linux-x64/better_sqlite3.node

at bindings (/rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/bindings/1.5.0/node_modules/bindings/bindings.js:126:9)

at Object.<anonymous> (/rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/lib/database.js:6:40)

at Module._compile (internal/modules/cjs/loader.js:759:30)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)

at Module.load (internal/modules/cjs/loader.js:628:32)

at Function.Module._load (internal/modules/cjs/loader.js:555:12)

at Module.require (internal/modules/cjs/loader.js:666:19)

at require (internal/modules/cjs/helpers.js:16:16)

at Object.<anonymous> (/rbd/pnpm-volume/403d9948-cd1c-4d18-a603-c2abb4a30fab/node_modules/.registry.npmjs.org/better-sqlite3/6.0.1/node_modules/better-sqlite3/lib/index.js:2:18)

at Module._compile (internal/modules/cjs/loader.js:759:30)

This is the error that keeps occuring and I don’t know how to fix this, as I just do: npm i quick.db, sqlite, bettersqlite-3.
Then I npm rebuild it, following up with a refresh. Or my other tries have been “enable-pnpm”

But now I think this still doesn’t work but only temporarily…

Can you share your package.json file?

{
“name”: “THSInterfare”,
“version”: “1.0.0”,
“main”: “index.js”,
“dependencies”: {
“ascii-art”: “^2.5.0”,
“better-sqlite3”: “^7.0.1”,
“chalk”: “^4.0.0”,
“cpu-stat”: “^2.0.1”,
“dblapi.js”: “^2.4.0”,
“discord.js”: “^11.6.4”,
“dotenv”: “^8.2.0”,
“express”: “^4.17.1”,
“ffmpeg”: “^0.0.4”,
“ffmpeg-binaries”: “^4.0.0”,
“fs”: “^0.0.2”,
“jsdom”: “^16.2.2”,
“log-symbols”: “^4.0.0”,
“m3u8stream”: “^0.7.0”,
“mathjs”: “^6.6.5”,
“mime-types”: “^2.1.27”,
“moment”: “^2.25.3”,
“moment-duration-format”: “^2.3.2”,
“ms”: “^2.1.2”,
“node-opus”: “^0.3.3”,
“opusscript”: “0.0.7”,
“os”: “^0.1.1”,
“parse-ms”: “^2.0.0”,
“parse-time”: “^0.1.4”,
“path”: “^0.12.7”,
“profanities”: “^2.13.0”,
“quick.db”: “^7.1.1”,
“quick.hook”: “^1.5.1”,
“require-all”: “^3.0.0”,
“sqlite”: “^4.0.7”,
“sqlite3”: “^4.2.0”,
“superagent”: “^5.2.2”,
“twitter”: “^1.7.1”,
“weather-js”: “^2.0.0”,
“weather.js”: “^0.1.0”,
“yt-search”: “^1.1.2”,
“ytdl-core”: “^2.1.1”
},
“engines”: {
“node”: “12.x”
},
“scripts”: {
“test”: “echo "Error: no test specified" && exit 1”,
“start”: “node index.js”
},
“keywords”: ,
“author”: “”,
“license”: “ISC”,
“devDependencies”: {},
“description”: “”
}

Here it is

{
“name”: “THSInterfare”,
“version”: “1.0.0”,
“main”: “index.js”,
“dependencies”: {
“ascii-art”: “^2.5.0”,
“better-sqlite3”: “^7.0.1”,
“chalk”: “^4.0.0”,
“cpu-stat”: “^2.0.1”,
“dblapi.js”: “^2.4.0”,
“discord.js”: “^11.6.4”,
“dotenv”: “^8.2.0”,
“express”: “^4.17.1”,
“ffmpeg”: “^0.0.4”,
“ffmpeg-binaries”: “^4.0.0”,
“fs”: “^0.0.2”,
“jsdom”: “^16.2.2”,
“log-symbols”: “^4.0.0”,
“m3u8stream”: “^0.7.0”,
“mathjs”: “^6.6.5”,
“mime-types”: “^2.1.27”,
“moment”: “^2.25.3”,
“moment-duration-format”: “^2.3.2”,
“ms”: “^2.1.2”,
“node-opus”: “^0.3.3”,
“opusscript”: “0.0.7”,
“os”: “^0.1.1”,
“parse-ms”: “^2.0.0”,
“parse-time”: “^0.1.4”,
“path”: “^0.12.7”,
“profanities”: “^2.13.0”,
“quick.db”: “7.1.1”,
“quick.hook”: “^1.5.1”,
“require-all”: “^3.0.0”,
“superagent”: “^5.2.2”,
“twitter”: “^1.7.1”,
“weather-js”: “^2.0.0”,
“weather.js”: “^0.1.0”,
“yt-search”: “^1.1.2”,
“ytdl-core”: “^2.1.1”
},
“engines”: {
“node”: “12.x”
},
“scripts”: {
“test”: “echo “Error: no test specified” && exit 1”,
“start”: “node index.js”
},
“keywords”: [“a”],
“author”: “”,
“license”: “ISC”,
“devDependencies”: {},
“description”: “”
}

I fixed it by removing sqlite things and making the quick.db version from “^7.1.1” to “7.1.1” i dont know why that bug exists but hey it should work now

I have tried this but this shows up parsing errors.

What is your project name? Can I inspect?

Open your glitch terminal (or glitch console) and run these commands:

pnpm prune
pnpm install -P

Alan, I rather keep my projects safe and secure.

ihack2712, this has not fixed the issue.

Can you try running pnpm rebuild sqlite3 ?

Run ls -la in the app directory. Can you send a screenshot of the result?

I have temporarly got my bot back up after running npm i quick.db, npm i sqlite, npm i better-sqlite3, npm rebuild, npm refresh. However this is always been done and the errors come back after it. This fix didn’t work out when creating the threat. I will try that and will send the screenshot of the result: https://thsinterfare.is-inside.me/xDLlQxV1.png and https://thsinterfare.is-inside.me/9UL0H8na.png

I see that the node_modules directory is still linked to the correct volume, so I don’t really understand what’s wrong with it if you’ve rebuilt the sqlite binary

I will reply to you if it happens again with new screenshots; maybe the re-install changed it for this time

Alright :slight_smile:

It happend again after trying to restart the bot.

Add console.log calls anywhere in your code where you interact with sqlite, or where anything else interacts with it.

How do I search where I’ve used sqlite and such?

In glitch, not possible. In VS Code you can use intellisense. I suggest everywhere you call to a function that isn’t written by you, you make a console.log call describing where and what you’re calling.

I’ve just used “npm i quick.db” now and its now back up, could that be an issue somewhere?