‘cannot find module webpack’ every now and then

I’ve been noticing that in the last 2 months or so, in every few days my app goes offline. When i log into glitch to see my logs and I get a ‘cannot find module webpack’ error (unfortunately I don’t have the exact error right now).

I’ve found this topic, that has a suggested fix posted in it.

In fact, the enable-pnpm command fix the issue. It reinstall packages and the app loads correctly. But why is this happening? Is there some glitch routine that happens every now and then and breaks my app?

This is a boosted app, that uses the “no-autorestart” tactic described here with the watch.json and .trigger-rebuild files.

1 Like

HI @Miguel_Prytoluk !

I’m sorry that sometimes you are seeing the missing modules errors in your Boosted project. I will be following up with you via email, but want to share some general info about this issue here.

Basically, what happens is that a project will be rotated to a new host and then something tells the editor that the modules are not available when they really are. Our team is working to fix it, but we haven’t gotten there just yet. Part of the challenge is that this issue occurs randomly so it’s been a bit more difficult to investigate. That being said, we have made this a priority at the moment and are making progress. Once the issue is fixed, I’ll be sending an update to folks who have sent us support request about this.

In the meantime, if a project is using Node 12 or older, running enable-pnpm in the project terminal will fix the issue. We know this is not a permanent fix, so project owners are welcome to send us a support request about this if they have additional concerns or questions.