Cannot find module discord.js

I’ve had a discord bot running (found in the project nex-discord) for a while now without any issues. Just recently, without me touching anything I’ve started getting an error: Error: Cannot find module 'discord.js'

I’ve tried to run pnpm install as recommended in other threads, however that ends up throwing the error: EACCES: permission denied, stat '/rbd/pnpm-volume/f0656776-473c-46c8-ae14-dc0a8f191872/node_modules/jws'.

Any help would be greatly appreciated, thanks!
Project: nex-discord.

Hey @SnowFlurries,

I couldn’t find the project nex-discord. Perhaps it is set to a private project?

Hey, yeah it’s a private project. I’ve just included the name, since iirc glitch staff members can still view a private project to help solve issues.

Hey @SnowFlurries,

Have you add the discord.js package in your package.json?

Yeah it’s there, I’ve also tried re-adding it. The bot has been running without issue for the last few months, this issue just popped up randomly without me ever changing a single thing in the project.

Hey @SnowFlurries,

do you see any errors in the logs?

Hey @SnowFlurries, can you try running enable-pnpm in your project’s console?

2 Likes

Hey @cori_testing, enable-pnpm seemed to fix it, thanks!