I’m having trouble with deploying Firebase functions and could use some assistance.
I have been trying to deploy my Firebase application, but I keep encountering the same problem repeatedly. The deployment goes well initially but crashes while building.
This is the error message I get:
ℹ functions: updating Node.js 16 function webapp-deploy-system:mainfunction(us-central1)...
⚠ Build failed: npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Invalid: lock file's [email protected] does not satisfy [email protected]
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR!
npm ERR! Clean install a project
npm ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Run "npm help ci" for more info
npm ERR! A complete log of this run can be found in:
npm ERR! /www-data-home/.npm/_logs/2023-03-18T17_41_51_146Z-debug-0.log; Error ID: xyz123
✔ functions[webapp-deploy-system:mainfunction(us-central1)] Successful update operation.
Functions deploy had errors with the following functions:
apiEndpoint(us-central1)
apiEndpoint-server:welcomeHandler(us-central1)
Function URL (webapp-deploy-system:mainfunction(us-central1)): https://mainfunction-abc123-uc.a.run.app
ℹ functions: cleaning up build files...
Error: There was an error deploying functions:
- Error Failed to update function apiEndpoint in region us-central1
- Error Failed to update function welcomeHandler in region us-central1
Can anyone suggest what might be the issue? I’ve attempted several different solutions but so far, nothing has worked.