I used a .slug-post-clean file to reduce my Heroku slug size error: Compiled slug size: 2.5G is too large (max is 500M) but it seems like it's not able to read the file.
-----> POST BUILD CLEAN app detected
Location node-modules/.cache not found - ignoring
Location .DS_Store/ not found - ignoring
Location .vscode/ not found - ignoring
Location logs not found - ignoring
Location temp-file.tmp not found - ignoring
Location tsconfig.json not found - ignoring
Location README not found - ignoring
Location .git not found - ignoring
Location .vscode not found - ignoring
Location .idea/ not found - ignoring
Location node_modules not found - ignoring
Location node_modules/ not found - ignoring
Location src not found - ignoring
Removing directory public from slug
Location test not found - ignoring
Location spec not found - ignoring
Location tmp/cache/webpacker not found - ignoring
My VSCode, React + Django:

here is my .slug-post-clean:
node-modules/.cache
.DS_Store/
.vscode/
logs
temp-file.tmp
tsconfig.json
README
.git
.vscode
.idea/
node_modules
node_modules/
src
public
test
spec
tmp/cache/webpacker