My bot project has been suspended for exceeding the node_modules limit - this seems to happen when I try to npm install or npm update.
I’ve unsuspended your project and given it additional disk space for 24 hours. This should give you the room needed to add files that are taking up too much space to
Project files that take up alot of space are usually ones that your project rewrites often. This includes any
Once you have add larger files to
.gitignore run the following commands in the project console:
git prune and hit enter
git gc and hit enter.
refresh and hit enter
This should free up the space you need.
If you have any questions, let us know!
Thanks @tasha - the problem lies in that I can’t actually work out what should be using that space - it appears to be something to do with node_modules - but it only happens when I try and run an npm update. Any chance you can look into it?
Ok the first thing you want to do is make sure that you’re actually using pnpm - you can run
enable pnpm just in case. If you do that, Glitch does some magic and doesn’t count your node-modules against your space quota.
Then, to figure out what’s taking up the most space, go to into your console and type the following command:
du -hd1 /rbd/pnpm-volume/app/node_modules
Then, you can move those larger files to a
Does that help you?
Yes - I think it’s sorted now. If I can ask a different question? I have a node package which I’m pulling in from github (it’s a fork) -> I am struggling to get glitch to update this without completely remixing the project. Can you help on this point?
Have you tried running
refresh in the project console? This may prevent the remix from happening.
Thanks @tasha - unfortunately that doesn’t seem to have worked - perhaps I should be clearer:
package.json I have the following:
Despite having made new commits to that branch I can’t get Glitch to update that node module - perhaps there’s some caching in place that I’m not able to bypass?
The default package manager on Glitch is
pnpm. You can use
npm with Glitch, but the structure of the node_modules directory that
npm creates is not conducive to sharing node_modules storage among multiple Glitch projects. So if you use
npm then the storage for your deps and transitive deps needs to fit inside the disk storage that is allocated for your projects exclusive use.
I have not used the git+https syntax with a commit-ish fragment targetting a branch before, but I think
pnpm update should do the analogous thing to
npm update. The advantage is, it won’t convert your project to the
enable-npm mode, and therefore cause you to exceed your storage.
Hope this helps,