Hello Netlify Community,
I’m experiencing an issue with deploying my React app. While the local build works perfectly, not all files are being uploaded when I deploy to Netlify.
The Problem:
- The Netlify deployment browser shows only “5 out of 11 files”
- Total size is only 2 MB
- The critical JavaScript and CSS files (main.[hash].js and main.[hash].css) are missing
- The site doesn’t work because the required assets are not present
My Configuration:
[build]
base = ""
publish = "Frontend/build"
command = "cd Frontend && npm install && CI=false NODE_OPTIONS=--openssl-legacy-provider npm run build"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
force = true
**What I've Already Tried:**
1. Modified .gitignore to include the build folder:
Exclude build folders
build/
dist/
But explicitly include Frontend/build
!Frontend/build/
!Frontend/build/**
2. Ran multiple local builds (all successful):
File sizes after gzip:
~100 kB build\static\js\main.[hash].js
~3 kB build\static\css\main.[hash].css
3. Tested different Git branches
**Technical Details:**
- React (Create React App)
- Git-based deployment
- Windows development environment
Has anyone experienced similar issues or can provide tips on why the assets aren't being uploaded correctly?
Thanks in advance for your help!