Puppeteer causes "disk full"-related problems


#1

Glitch doesn’t seem to handle “uninstalling” Puppeteer very well and so when I’m typing away into the editor, and Puppeteer’s install keeps getting interrupted due to the auto-save/restart, it seems to leave around some files or something and steadily fill up the disk space.

I first started getting a disk full error and then that turned into this error:

(node:1060) UnhandledPromiseRejectionWarning: Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
    at Launcher.launch (/app/node_modules/puppeteer/lib/Launcher.js:118:15)

I copied all the code to a new project and then it worked fine again.

Here’s the old project with the errors:

https://glitch.com/edit/#!/perchance-discord-bot-template-old

And here’s new new one without the errors:

https://glitch.com/edit/#!/perchance-discord-bot-template

The fact that it works fine when I copy my code across to a new project makes me think that this is a glitch but, rather than a mistake on my part.


#3

It could be because your not using PNPM. Run enable-pnpm in the console. When using PNPM your node_modules folder doesn’t counts towards disk usage


#4

Thanks! Looks like that solved it - I’ll remember that in the future.