My temporary solution is to delete the node_modules folder while the backup is happening. A simple npm -i will get the folder back with all of its content and is not neccessary for the working of your website. I got this answer from my programmer a couple of months ago and it seems to work like a charm.
I use the following cronjob to delete this folder. It does not delete anything leading up to that folder, it's not like you're going to delete the whole /home folder.
Tested on CentOS7
50 23 * * * find /home/ -maxdepth 5 -not \( -path "*imap*" -o -path "*Maildir*" -o -path "*backups*" -o -path "*tmp*" \) -type d -path "*/public_html/node_modules" -exec rm -rf {} \;
Explanation: find in the /home folder of every user any map that's not related to mail, backups or tmp, only show directories as results which excludes files, and make it required to be in the path of public_html, then delete these specific folders called, as an example, /home/userhere/domains/domainhere.com/public_html/node_modules. Do not look any deeper than 5 layers to make sure the find command doesn't run as long as it needs to. Take away the part -exec rm -rf {} \; if you don't want to delete the folder but only want to show the folders found
Edit: A permanent solution is out of our control. NPM gets a couple of modules online, and you're dependent on the authors of these modules to fix what they need to do, but you still require the modules in order to develop your website, which is why I delete the folder at a time when one is most likely not using it, right before the backup - assuming it's a regularly scheduled backup just after midnight