[ERROR] Cannot find module

Hello,
I’m trying to run a discoed bot but I keep getting this error:

internal/modules/cjs/loader.js:613

8:36 PM

throw err;

8:36 PM

^

8:36 PM

8:36 PM

Error: Cannot find module ‘…/build/better_sqlite3.node’

8:36 PM

Require stack:

8:36 PM

  • /rbd/pnpm-volume/8aab6155-91a6-4134-90c9-d2b47cd7f9df/node_modules/.registry.npmjs.org/better-sqlite3/5.4.3/node_modules/better-sqlite3/lib/database.js

8:36 PM

  • /rbd/pnpm-volume/8aab6155-91a6-4134-90c9-d2b47cd7f9df/node_modules/.registry.npmjs.org/better-sqlite3/5.4.3/node_modules/better-sqlite3/lib/index.js

8:36 PM

  • /rbd/pnpm-volume/8aab6155-91a6-4134-90c9-d2b47cd7f9df/node_modules/.registry.npmjs.org/quick.db/7.0.0-b22/node_modules/quick.db/bin/handler.js

8:36 PM

  • /rbd/pnpm-volume/8aab6155-91a6-4134-90c9-d2b47cd7f9df/node_modules/.registry.npmjs.org/quick.db/7.0.0-b22/node_modules/quick.db/index.js

8:36 PM

I have tried doing enable-pnpm but it isn’t working.

Project: skillbotv3 :grinning:

Hey @SkillBeatsAll,

Can you try running enable-pnpm in the console?

Hey khalby,

He did:


Hi SkillBeatsAll,

Try to install your packages using the console.

I have seen that you have said that all your packages have already been installed, but try to install them again through the console.

npm I <packagename> would help. Just replace with the name of your package and you’ll be fine :smiley:

Let me know if this worked.

1 Like

Often this is caused by installing quick.db or enmap, as they both use a module that uses C bindings, but it can’t find the bindings sometimes.

Hey Consoli,

What you’re saying is true. If this user is indeed running on Discord.js v12 and having quick.db as dabase, then it may cause the issue I have and the most recommended thing is putting Discord.js back to version 11.6.2 and putting node to 10.x

Hmm, I tried quick.db a couple months ago on Node v8 and I still got the same error, I doubt it is related to the Node version, but I may be wrong.

Hey Consoli,

Yeh, I think quick.db has to update it’s source so it’s approved for node v12 and below as well.

Currently, I am running on node v10 and have no issues!

1 Like