Vite + Antd App works on Windows but Single Page crashes on Linux Production (Minified React Error #130)

Published: (December 12, 2025 at 11:45 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Issue

I have a React application (Vite + Ant Design) deployed on Nginx (Linux). The application works perfectly in my local environment (Windows) and usually runs fine in production.

The entire app works correctly until I navigate to one specific route (MachinesDashboard).

  • Windows (local & prod build): the page loads perfectly.
  • Linux (Nginx production): clicking this route immediately crashes the page with an error‑boundary screen.

Error

Minified React error #130: Element type is invalid: expected a string (for built‑in components) or a class/function (for composite components) but got: object.

Debugging So Far

I suspected an invalid import, so I added console.log statements inside the crashing component (MachinesDashboard) in the production build to inspect the imports.

Imports in the crashing file

import { Select, Badge, Button, Statistic, Row, Col, message, Modal } from 'antd';

The logged values were:

ImportTypeValid?
EChartFunction
DraftDetailsFunction
CoreTableFunction
IconFunction
ClockCircleOutlinedObject ({ $$typeof: Symbol(react.forward_ref), ... })

All custom components and the Ant Design icons appear to be valid.

Question

Since all my custom components and the icons seem valid, why does this specific route crash only on Linux?

Possible causes I’m considering

  • Ant Design imports – Could destructured imports like import { Row, Col } from 'antd' resolve to an empty object/module in Linux production builds?
  • File‑system case sensitivity – My file names (DraftDetails.tsx, ECharts.tsx) match their imports, but could a mismatched folder name cause an import to be an object without throwing a 404 on a case‑sensitive Linux file system?
  • Cyclic dependencies – Might a circular dependency behave differently on Linux (due to file sorting) causing a component to be undefined/object at render time?

Environment

  • React: 18
  • Vite: 4
  • Host: Linux Ubuntu + Nginx
  • Build: vite build
Back to Blog

Related posts

Read more »

Under the hood: React

Introduction I've wanted to do this since the moment I started using React: understand what makes it tick. This is not a granular review of the source code. In...