Netlify: New Site Not Deploying Despite Other Sites Functioning Smoothly

22 Views Asked by At

The problem arose during the recent deployment process when Netlify encountered difficulties deploying the Firebase functions. The specific error message displayed was: Error: Functions did not deploy properly. This is particularly perplexing since all other sites deployed without any problems.

I have meticulously reviewed the deployment settings and confirmed that they are consistent with the successful deployments of other sites. However, despite my efforts, the new deployment of Firebase functions seems to be failing consistently.

I am reaching out to seek assistance in understanding the root cause of this issue. Your expertise in this matter would be invaluable in helping me resolve the problem and achieve a successful deployment.

If there are any insights or suggestions you can provide, or if you require additional information from my end, please let me know. I am eager to get to the bottom of this and ensure a seamless deployment of Firebase functions on Netlify.

Build problems:

3:36:26 PM: ⚠  functions: Please note that there will be breaking changes when you upgrade.
3:36:26 PM: i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
3:37:03 PM: i  functions: updating Node.js 12 function onUserDeleted(us-central1)...
3:38:11 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
3:38:08 PM: i  functions: cleaning up build files...
3:38:10 PM: Functions deploy had errors with the following functions:
3:38:10 PM:     checkNameUniqueness(us-central1)
3:38:10 PM:     onUserCreated(us-central1)
3:38:10 PM:     onDeletePersonRecord(us-central1)
3:38:10 PM:     storeBackup(us-central1)
3:38:10 PM: To try redeploying those functions, run:
3:38:10 PM:     firebase deploy --only functions:checkNameUniqueness,functions:onUserCreated,functions:sendMail,functions:z_googleDriveFileQuery
3:38:10 PM: To continue deploying other features (such as database), run:
3:38:10 PM:     firebase deploy --except functions
3:38:10 PM: Error: Functions did not deploy properly.
3:38:10 PM: ​
3:38:10 PM: build.command failed                                        
3:38:10 PM: ────────────────────────────────────────────────────────────────
3:38:10 PM: ​
3:38:10 PM:   Error message
3:38:10 PM:   Command failed with exit code 1: npm run validate-env && cd functions && npm install && npm run deploy && cd .. && CI= npm run build (https://ntl.fyi/exit-code-1)
3:38:10 PM: ​
3:38:10 PM:   Error location
3:38:10 PM:   In build.command from netlify.toml:
3:38:10 PM:   npm run validate-env && cd functions && npm install && npm run deploy && cd .. && CI= npm run build
3:38:10 PM: ​
3:38:10 PM:   Resolved config
3:38:10 PM:   build:
3:38:10 PM:     command: npm run validate-env && cd functions && npm install && npm run deploy && cd .. && CI= npm run build
3:38:10 PM:     commandOrigin: config
3:38:10 PM:     environment:
3:38:10 PM:       - FIREBASE_TOKEN
3:38:10 PM:       - REACT_APP_ALLOW_MANUAL_RAMCIS_NUM_GENERATE
3:38:10 PM:       - REACT_APP_API_KEY
3:38:10 PM:       - REACT_APP_AUTH_DOMAIN
3:38:10 PM:       - REACT_APP_BUCKET
3:38:10 PM:       - REACT_APP_DATABASE_URL
3:38:10 PM:       - REACT_APP_MSG_SENDER_ID
3:38:10 PM:       - REACT_APP_OVERRIDE_ALLOW_ALL_MASTER_ACTIVITY_EDITS
3:38:10 PM:       - REACT_APP_PROJECT_ID
3:38:10 PM:       - REACT_APP_REPORT_ISSUES
3:38:10 PM:       - REACT_APP_URL
3:38:10 PM:     publish: /opt/build/repo/build
3:38:10 PM:     publishOrigin: config
3:38:10 PM:   functionsDirectory: /opt/build/repo/functions
3:38:10 PM:   headers:
3:38:10 PM:     - for: /*
      values:
        Referrer-Policy: no-referrer
        X-Content-Type-Options: nosniff
        X-Frame-Options: DENY
        X-XSS-Protection: 1; mode=block
  headersOrigin: config
  redirects:
    - from: /*
      status: 200
      to: /index.html
  redirectsOrigin: config
Caching artifacts
3:38:10 PM: Started saving node modules
3:38:10 PM: Finished saving node modules
3:38:10 PM: Started saving build plugins
3:38:10 PM: Finished saving build plugins
3:38:10 PM: Started saving corepack cache
3:38:10 PM: Finished saving corepack cache
3:38:10 PM: Started saving pip cache
3:38:10 PM: Finished saving pip cache
3:38:10 PM: Started saving emacs cask dependencies
3:38:11 PM: Finished saving emacs cask dependencies
3:38:11 PM: Started saving maven dependencies
3:38:11 PM: Finished saving maven dependencies
3:38:11 PM: Started saving boot dependencies
3:38:11 PM: Finished saving boot dependencies
3:38:11 PM: Started saving rust rustup cache
3:38:11 PM: Finished saving rust rustup cache
3:38:11 PM: Started saving go dependencies
3:38:11 PM: Finished saving go dependencies
3:38:11 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
3:38:11 PM: Failing build: Failed to build site
3:38:12 PM: Finished processing build request in 4m39.12s
0

There are 0 best solutions below