Please help me with my bot javascript discord


/rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/bindings/bindings.js:135

5:18 PM

throw err;

5:18 PM

^

5:18 PM

5:18 PM

Error: Could not locate the bindings file. Tried:

5:18 PM

→ /rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/build/better_sqlite3.node

5:18 PM

→ /rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/build/Debug/better_sqlite3.node

5:18 PM

→ /rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/build/Release/better_sqlite3.node

5:18 PM

→ /rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/out/Debug/better_sqlite3.node

5:18 PM

→ /rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/Debug/better_sqlite3.node

5:18 PM

→ /rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/out/Release/better_sqlite3.node

5:18 PM

→ /rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/Release/better_sqlite3.node

5:18 PM

→ /rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/build/default/better_sqlite3.node

5:18 PM

→ /rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/compiled/8.15.1/linux/x64/better_sqlite3.node

5:18 PM

→ /rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/addon-build/release/install-root/better_sqlite3.node

5:18 PM

→ /rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/addon-build/debug/install-root/better_sqlite3.node

5:18 PM

→ /rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/addon-build/default/install-root/better_sqlite3.node

5:18 PM

→ /rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/lib/binding/node-v57-linux-x64/better_sqlite3.node

5:18 PM

at bindings (/rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/bindings/bindings.js:126:9)

5:18 PM

at Object. (/rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/lib/database.js:4:40)

5:18 PM

at Module._compile (module.js:653:30)

5:18 PM

at Object.Module._extensions…js (module.js:664:10)

5:18 PM

at Module.load (module.js:566:32)

5:18 PM

at tryModuleLoad (module.js:506:12)

5:18 PM

at Function.Module._load (module.js:498:3)

5:18 PM

at Module.require (module.js:597:17)

5:18 PM

at require (internal/module.js:11:18)

5:18 PM

at Object. (/rbd/pnpm-volume/f40aa985-a931-4ba7-b427-20c2ce5f78c9/node_modules/better-sqlite3/index.js:2:18)

Hello, @Mohamedamine2005.

Users will not be able to help you if you do not provide adequate information, which in this case is:

  • Your project name

However, try reinstalling node_modules and let me know if it fixes your issue.

Regards,
Ares

1 Like

I saw that the error is related to the bindings package. I searched it in npm website and I found this:

When the .node file could not be loaded, node-bindings throws an Error with a nice error message telling you exactly what was tried. You can also check the err.tries Array property.

Error: Could not load the bindings file. Tried:
 → /Users/nrajlich/ref/build/binding.node
 → /Users/nrajlich/ref/build/Debug/binding.node
 → /Users/nrajlich/ref/build/Release/binding.node
 → /Users/nrajlich/ref/out/Debug/binding.node
 → /Users/nrajlich/ref/Debug/binding.node
 → /Users/nrajlich/ref/out/Release/binding.node
 → /Users/nrajlich/ref/Release/binding.node
 → /Users/nrajlich/ref/build/default/binding.node
 → /Users/nrajlich/ref/compiled/0.8.2/darwin/x64/binding.node
    at bindings (/Users/nrajlich/ref/node_modules/bindings/bindings.js:84:13)
    at Object.<anonymous> (/Users/nrajlich/ref/lib/ref.js:5:47)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    ...
The searching for the .node file will originate from the first directory in which has a package.json file is found.
1 Like

What’s ‘node-modules’ ?
Sorry for my bad english :pensive:

You will find a folder named node_modules in the root directory, @Mohamedamine2005.

In order to do reinstall those do this:

  • Open app console
  • Run the command rm -r node_modules
  • Run the refresh command
  • Close console
  • Open package.json in the IDE and install the packages again

Regards,
Ares

1 Like

Hi @Mohamedamine2005, did you try running enable-pnpm in the console? It should fix most module issues by doing a clean re-install of all packages.

As @TooAkshi said, you could run rm -r node_modules to re-install the packages again in package.json

Hopefully this helped