Skip to content

Netlify deploy error due to unresolved JSON import in Vite build#3

Open
netlify-coding[bot] wants to merge 1 commit into
mainfrom
agent-import-in-vite-build-c20c
Open

Netlify deploy error due to unresolved JSON import in Vite build#3
netlify-coding[bot] wants to merge 1 commit into
mainfrom
agent-import-in-vite-build-c20c

Conversation

@netlify-coding

Copy link
Copy Markdown

🔗 View agent run: https://app.netlify.com/projects/myrecoveryspokane/agent-runs/6a0a5f495d701deb4388c20c

🤖 Agent: Claude

💬 Prompt: The Netlify deploy errored, with the following guidance provided:

Diagnosis

  • Relevant error lines: the build command that ran is shown at #L51 and the failure is "Could not resolve '../../firebase-applet-config.json' from 'src/lib/firebase....

Result: # Fix: Remove missing firebase-applet-config.json import

The Netlify build was failing because src/lib/firebase.ts contained a static import of ../../firebase-applet-config.json, a file that was never committed to the repository. Rollup (used internally by Vite) could not resolve this path at build time, causing the build to exit with a non-zero code before producing any output.

The file already read Firebase configuration values from VITE_FIREBASE_* environment variables, using the JSON file only as a fallback. Since the JSON file was absent and the environment variables are the intended source of truth for the deployed environment, the JSON import and all references to it were removed. The Firebase app initialization now reads exclusively from VITE_FIREBASE_API_KEY, VITE_FIREBASE_AUTH_DOMAIN, VITE_FIREBASE_PROJECT_ID, VITE_FIREBASE_STORAGE_BUCKET, VITE_FIREBASE_MESSAGING_SENDER_ID, VITE_FIREBASE_APP_ID, VITE_FIREBASE_MEASUREMENT_ID, and VITE_FIREBASE_FIRESTORE_DATABASE_ID.

For the application to connect to Firebase correctly after this change, all of those VITE_FIREBASE_* environment variables must be set in the Netlify site settings. Any that are currently stored under non-prefixed names (e.g., apiKey, projectId) will need to be added with the VITE_ prefix so Vite exposes them to the client bundle.

@netlify

netlify Bot commented May 18, 2026

Copy link
Copy Markdown

Deploy Preview for myrecoveryspokane ready!

Name Link
🔨 Latest commit 09a6522
🔍 Latest deploy log https://app.netlify.com/projects/myrecoveryspokane/deploys/6a0a6004cba86e0008192957
😎 Deploy Preview https://deploy-preview-3--myrecoveryspokane.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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