[Resolved] Cannot find module 'express'

Hello! I’m hosting a Discord bot on glitch, and today, I got an error saying:

internal/modules/cjs/loader.js:550
throw err;
^
Error: Cannot find module ‘express’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)

I’ve seen posts saying this was fixed. Is it something wrong with my code only?
Project: https://panda-turtle-bot.glitch.me

This can happen for a few reasons. Check your project isn’t out of space - run ‘df’ at the console and see the percentage space used for the ‘/app’ entry. Failing that, we’ve seen a spate of these errors caused by 404 errors resulting from invalid URLs used for other dependencies in your package.json file. Particularly ones for discord.js now the old organization has been redirected. Check for that too and let us know if you’re still having trouble.

1 Like

@Gareth | I am having the same issue. However, my storage isn’t capped. Any other solutions? Thank you in advance.

If it’s none of the above, then let us know the project name and we’ll take a look. If your project is private, either make it public temporarily or DM me a join link so we can view the code. Thanks.

@Gareth | I will send you an invite link.

I have the same issue with this https://spade.glitch.me
I tried npm i, but it didnt help

hi! i just went to your app and it looks like you’ve got it running now! if you’re still having issues, though, let me know!

1 Like

Just tried to install a new module and the whole thing cracked up. So I tried what was suggested here and it’s still not working. What else can I do?

Hi @Jella,

I am sorry the suggestions here did not help you!

Can you please try going to your project editor, opening the project console and then running the following command:
enable-pnpm

If that does not help, then respond with your project name here and we can take a closer look.

1 Like

Hello. The method worked a few days ago but as I tried it again today, it isn’t working. Here’s the link to my project.

https://glitch.com/edit/#!/join/10fc2cac-d12b-43e4-aac4-f9c38aac63b9

fixed! dont upgrade bot-utils

Hello. Sorry to bother you again but the ‘module express not found’ error is back and preventing my bot from being online. Pls adhere to this query as soon as possible. Thank you!

Did enable-pnpm work for you?

1 Like

No it didn’t and I also ran refresh command, still nothing.

Hello. My request has been pending for quite some time now. Here’s the link to my project.

https://glitch.com/edit/#!/join/e8c0af32-78f1-47ae-8423-365a004e9400

Thanks again.

The solution that’s worked the best for me is to open the console and type enable-npm. I’ve also tried installing express through the console as well, and usually one of them fixes the issue. I noticed that your throttle time is set to a really high number. I’ve set mine to 90000, and the issue hasn’t occurred again in any of my projects.

Hello. I tried your procedure and it still doesn’t work. I tried the refresh command, pnpm command and also reduced the throttle. Pls attend to this quickly as this bot runs on 4 servers and I’m getting a lot of complains. Thank you.

Hi @Jella,

We can take a closer look, but we will need to know the project name first. Since your project is stuck at loading, your project name is not displaying.

Hey @Jella, that link is public, meaning anyone can join and manipulate your project! Please remove it as soon as possible!

@support_staff, can you remove it?

@Jella

I just checked on your project and it looks like everything is loading now. If it’s still not loading for you, let me know!