Error: Cannot find module 'express'


#1

Alright so I have been watching a few tutorials here and there on how to host my discord bot using glitch.
For some odd reason though I keep getting this error,
Error: Cannot find module 'express'.
I’m not sure why it does this.


#2

Nevermind for some reason it just decided to fix itself


#3

Hmm, I’m also seeing this error in one of my projects https://glitch.com/edit/#!/slack-arena?path=server.js

i’ve made no changes since it was working earlier in the day … :thinking:


#4

I reinstalled all my modules using npm i and for some reason they all came back to life


#5

ya that did it, possibly there’s an issue with our changes to package management/pnpm :thinking: , hopefully if more ppl report this we can repro and fix it


#6

Running npm i fixed my issue with a module load error (mongoose). Maybe something as simple as a ‘Re-run NPM install’ button inside of the advanced setting section would be able to quickly resolve any module load error.


#7

Getting this exact problem in only one of my projects

https://testing-with-mocha.glitch.me

ran npm i and it installed the modules in the console but immediately started experiencing the error in the logs and the app won’t start


#8

This has fixed itself. ignore previous comment


#9

I saw the same error today in one of my projects and it was resolved with running “npm i” in console