Instead of suspending project due to node_modules, Just wipe node_modules

Instead of suspending project just because:

Suspended for exceeding node_modules space.

Just make glitch system to wipe node_modules if the size exceeding the maximum capacity, Or pause the server then log Your project has been paused due to the node_modules directory exceeding the allowed maximum capacity. Considering doing module reinstallation by running "<command here>".

3 Likes

That seems quite strange, altought Glitch sometimes also suspends for “Error while preparing project”. Maybe support [at] glitch [dot] com can help!

I agree, mine got suspended because of that ._.

1 Like

last time this came up, it was said that this is difficult to resolve because Glitch would automatically reinstall the dependencies, which they expect to cause the node_modules space exceedance again right away

1 Like

Maybe clear the node_modules and also remove it from package.json?

For that, the solution is relatively simple:

  • Kill the pnpm / npm process
  • Pause automation commands for reinstalling npm packages until user change packages.json

If the space exceed during reinstallation again, The same step should be repeated until it’s satisfied.

1 Like