Cannot find modules

I’ve tried remixing the project and enabling pnpm but still nothing is happening.
Result: Getting the error

Project Name: clan-

From a Discord Bot Developer and Glitch User,
TehPig_YT

@Glitch_Response This is the output, as you know it.

You did not define discord.js

image
image

Uh? Where did you put this code?

First image: package.json
Second image: bot.js

Ah yes sorry for the confusion I did not see the separation

It’s ok. These kind of things may happen ¯_(ツ)_/¯

If your project is in public can you send me an url?

Let me send you a link in your private messages.

1 Like

Can I change the package.json keeping the same dependencies?

Sure i have nothing important in there.

And the project is just a testing one.

A package is old which causes an error

I use enable-pnpm all the time.

I’m thinking this has to do with caching like the package version is cached and it doesn’t detect the update so it doesn’t know about the latest version and just errors.

So, what are you going to do now?

I also got this error in another project (I don’t know why every project that I create today doesn’t work properly):

/rbd/pnpm-volume/31d451fa-d405-407f-8ca4-8170c35a84da/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/31d451fa-d405-407f-8ca4-8170c35a84da/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/better_sqlite3.node
 → /rbd/pnpm-volume/31d451fa-d405-407f-8ca4-8170c35a84da/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
 → /rbd/pnpm-volume/31d451fa-d405-407f-8ca4-8170c35a84da/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/Release/better_sqlite3.node
 → /rbd/pnpm-volume/31d451fa-d405-407f-8ca4-8170c35a84da/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
 → /rbd/pnpm-volume/31d451fa-d405-407f-8ca4-8170c35a84da/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/Debug/better_sqlite3.node
 → /rbd/pnpm-volume/31d451fa-d405-407f-8ca4-8170c35a84da/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/out/Release/better_sqlite3.node
 → /rbd/pnpm-volume/31d451fa-d405-407f-8ca4-8170c35a84da/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/Release/better_sqlite3.node
 → /rbd/pnpm-volume/31d451fa-d405-407f-8ca4-8170c35a84da/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/default/better_sqlite3.node
 → /rbd/pnpm-volume/31d451fa-d405-407f-8ca4-8170c35a84da/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/compiled/12.0.0/linux/x64/better_sqlite3.node
 → /rbd/pnpm-volume/31d451fa-d405-407f-8ca4-8170c35a84da/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/31d451fa-d405-407f-8ca4-8170c35a84da/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/31d451fa-d405-407f-8ca4-8170c35a84da/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/31d451fa-d405-407f-8ca4-8170c35a84da/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/lib/binding/node-v72-linux-x64/better_sqlite3.node
    at bindings (/rbd/pnpm-volume/31d451fa-d405-407f-8ca4-8170c35a84da/node_modules/.registry.npmjs.org/bindings/1.5.0/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/rbd/pnpm-volume/31d451fa-d405-407f-8ca4-8170c35a84da/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: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/31d451fa-d405-407f-8ca4-8170c35a84da/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:759:30)```

The problem comes from npm try to remix the project is to recreate it

You are cut the code in package ?

1st. Remixing doesn’t solve the problem
2nd. I haven’t touched package.json only the node version.

Sorry to not be able to help you further the error does not come from the code itself but from the fact that "caching like the package version is cached and it doesn’t detect the update so it doesn’t know about the latest version and just errors. "

And how do I fix this now?

Run npm cache clean

Only accepts npm cache clean --force

Try it then ^^ For extra characters

Didn’t work in one of the projects

Which precisely? again for the characters

The one with the

Could not locate the bindings file
error

For the other one, I think it’s ok now

Anything to suggest yet?

I already tried it may be necessary to wait for your project to detect it automatically

How exactly will that happen?

Npm erases the old cache and displays the new ones

Hm. I’m currently trying a new way to fix it.

1 Like

Nothing works :sob:

It said: Found 1 vulnerability

It needs to reinstall all the packages from the console >:(

Read the above if you can, please.

Also, how can I install node_modules again?

@glitch_support Please, i’m desperate.
Trying to solve this all day and nothing yet.

Project Name: t-moderator-bot