Skip to content

Fix: remove duplicate component imports breaking production build - #1905

Open
webgo-oss wants to merge 1 commit into
souma9830:masterfrom
webgo-oss:duplicate
Open

Fix: remove duplicate component imports breaking production build#1905
webgo-oss wants to merge 1 commit into
souma9830:masterfrom
webgo-oss:duplicate

Conversation

@webgo-oss

Copy link
Copy Markdown

Problem

npm run build fails outright with an esbuild syntax error and never produces a production bundle:

[vite:esbuild] Transform failed with 1 error:
ERROR: The symbol "ExifMetadataInspector" has already been declared

Three page components each import the same child component twice at the top level. esbuild treats a duplicate top-level binding as a hard syntax error, not a warning — so the build fails completely rather than just showing a lint warning.

npm run dev doesn't catch this (looser dev-server transform), which is likely why it went unnoticed until someone tried a production build.

Root cause

Duplicate import statements for the same component in:

  • frontend/src/pages/UploadPage.jsx — ExifMetadataInspector
  • frontend/src/pages/EditorPage.jsx — PresetFilterManager
  • frontend/src/pages/PrintPreviewPage.jsx — CustomPaperSizeCalculator

Fix

Removed the redundant second import line in each file. No logic changes — the components are still used exactly as before via their first (original) import.

Testing

cd frontend
npm install
npm run build

Build now completes successfully (built in ~13s), no esbuild errors.

Changes

  • 3 files changed
  • 3 lines removed
  • 0 lines added
  • No behavior change — this is a pure build-fix, safe to merge immediately.

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

@webgo-oss is attempting to deploy a commit to the souma9830's projects Team on Vercel.

A member of the Team first needs to authorize it.

@souma9830

Copy link
Copy Markdown
Owner

Open source programme name @webgo-oss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants