Error: Could not locate the bindings file. (already tried enable-pnpm)

/rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/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/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/better_sqlite3.node
 → /rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
 → /rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/Release/better_sqlite3.node
 → /rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
 → /rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/Debug/better_sqlite3.node
 → /rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/out/Release/better_sqlite3.node
 → /rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/Release/better_sqlite3.node
 → /rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/default/better_sqlite3.node
 → /rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/compiled/11.14.0/linux/x64/better_sqlite3.node
 → /rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/addon-build/release/install-root/better_sqlite3.node
 → /rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/addon-build/debug/install-root/better_sqlite3.node
 → /rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/addon-build/default/install-root/better_sqlite3.node
 → /rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/lib/binding/node-v67-linux-x64/better_sqlite3.node
    at bindings (/rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/bindings/1.5.0/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/lib/database.js:4:40)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/index.js:2:18)
    at Module._compile (internal/modules/cjs/loader.js:816:30)

I have already tried enable-pnpm and updating node which didn’t work. Project is private. name: fragrant-rake
When I remove quick.db this error message doesn’t show up. However, my bot needs quick.db to function properly.

Getting the same error

Can someone please give me a solution

@support_staff If you could help us :expressionless:

Hi @Y0UR-U5ERNAME and @TehPig_YT,

I’m sorry that you are running into these errors!

If you haven’t done so already, can you please review your project to confirm that all your packages are up-to-date?

When pnpm install and enable-pnpm don’t work, sometimes an outdated package is the culprit.

I think my project’s packages are ok.
Haven’t updated them lately.

Project name: t-moderator-bot

Any ideas to try an fix it? :sob:

@TehPig_YT,

When enable-pnpm doesn’t work, the issue is typically related to one of the packages in your project. You will want to go through your code and ensure:

  • Your packages are present and up to date,
  • The packages you installed are compatible with the glitch editor.

My packages are up to date and I’m pretty sure they are compatible with glitch. However, I do get these messages when I run pnpm install.

WARN deprecated circular-json@0.59: CircularJSON is in maintenance only, flatted is its successor.
WARN deprecated ffmpeg-binaries@4.0.0: ffmpeg-binaries is no longer being maintained. use ffmpeg-static, or just install ffmpeg
...
ERROR ENOENT: no such file or directory, chmod '/rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/node/bin/node'

Also, removing the dependency quick.db seems to send a different error message (about not having quick.db) but doesn’t send the bindings error message.

I’ve replaced my quick.db with a JSON database (no more bindings error! but also no more old data from database :sob: ), and now it shows the error:

internal/modules/cjs/loader.js:670
    throw err;
    ^
Error: Cannot find module '../build/Release/canvas.node'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
    at Function.Module._load (internal/modules/cjs/loader.js:591:27)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/rbd/pnpm-volume/d39ac577-f287-46ac-80eb-8b72abf73e5a/node_modules/.registry.npmjs.org/canvas/2.6.1/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)

How do I fix that? I tried

rm -rf node_modules
npm install
refresh

Edit: The error still persists, but the bot is on and listens to commands??? :confused:

do this:

npm r canvas
enable-pnpm
npm i canvas

It removed the canvas error, but now it shows a really long error. However, there is no “Error” beside the Tools dropdown so I think it’s fine. :ok:

send the error, i will decode it aswell,
and in the mean time, do

rm -rf node_modules
enable-pnpm
npm r *
npm i [all your modules listed here, seperated by spaces]

that should silence all errors for about an hour

The error is too long I don’t know when it starts. It is about my code.

...
(node:21197) UnhandledPromiseRejectionWarning: TypeError: Object.fromEntries is not a function
...
1 Like

invite me to your project, i will attempt to decipher the issue, and give tips on how to prevent it