Netlify deploy error due to unresolved JSON import in Vite build#2
Open
netlify-coding[bot] wants to merge 1 commit into
Open
Netlify deploy error due to unresolved JSON import in Vite build#2netlify-coding[bot] wants to merge 1 commit into
netlify-coding[bot] wants to merge 1 commit into
Conversation
…a5de2fbbca0e8cf1a1ddd)
✅ Deploy Preview for myrecoveryspokane ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 View agent run: https://app.netlify.com/projects/myrecoveryspokane/agent-runs/6a0a5de2fbbca0e8cf1a1ddd
🤖 Agent: Claude
💬 Prompt: The Netlify deploy errored, with the following guidance provided:
Diagnosis
✅ Result: The Netlify build was failing because
src/lib/firebase.tsimported Firebase configuration from a local JSON file (../../firebase-applet-config.json) that was never committed to the repository. Rollup (used by Vite) could not resolve this import at build time, causing the build to exit with a non-zero status.The file already read Firebase credentials from
VITE_FIREBASE_*environment variables as its primary source, with the missing JSON file as a fallback. The fix removes the JSON import entirely and uses only the environment variables, which is the correct approach for keeping secrets out of source control. The following variables must be set in the Netlify environment for the app to function:VITE_FIREBASE_API_KEYVITE_FIREBASE_AUTH_DOMAINVITE_FIREBASE_PROJECT_IDVITE_FIREBASE_STORAGE_BUCKETVITE_FIREBASE_MESSAGING_SENDER_IDVITE_FIREBASE_APP_IDVITE_FIREBASE_MEASUREMENT_IDVITE_FIREBASE_FIRESTORE_DATABASE_IDNo other files were changed.