Incomplete Deployment: Missing JS/CSS Files (Only 5 out of 11 Files Uploaded)

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!

@Pevauce This may be unrelated to your issue, but you can simplify, instead of…

[build]
  base = ""
  publish = "Frontend/build"
  command = "cd Frontend && npm install && CI=false NODE_OPTIONS=--openssl-legacy-provider npm run build"

You can do…

[build]
  base = "Frontend"
  publish = "build"
  command = "CI= NODE_OPTIONS=--openssl-legacy-provider npm run build"

For more information you can read the documentation here:
https://docs.netlify.com/configure-builds/file-based-configuration/#build-settings
https://docs.netlify.com/configure-builds/overview/#definitions

I’d imagine you already have, but just make sure you’re running your “build command” locally too when comparing (not any development command you may have).

Since you’re using Windows, be wary of the potential for case sensitivity issues too.