Firebase Deploy Unexpected Error – How to Resolve? [An unexpected error has occurred.] [TypeError: Cannot read properties of null (reading ‘match’)]

Hello StackOverflow community,

I have been encountering an unexpected error while trying to deploy my project using Firebase. The error occurred suddenly; everything was working fine until August 28th. Here is the background and the error message I received:

Background:

  • Project Name: LINE-shift
  • Firebase Project ID: line-shift
  • Deployment command: firebase deploy
  • Firebase tools version: Latest (as of September 19, 2023)
  • Additional actions taken: PC reboot

Error Message:

=== Deploying to 'line-shift'...
i  deploying storage, firestore, functions, hosting
i  firebase.storage: checking storage.rules for compilation errors...
✔  firebase.storage: rules file storage.rules compiled successfully
i  firestore: reading indexes from firestore.indexes.json...
i  cloud.firestore: checking firestore.rules for compilation errors...
✔  cloud.firestore: rules file firestore.rules compiled successfully
i  functions: preparing codebase default for deployment
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i  functions: ensuring required API cloudbuild.googleapis.com is enabled...
i  artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled...
✔  functions: required API cloudbuild.googleapis.com is enabled
✔  functions: required API cloudfunctions.googleapis.com is enabled
✔  artifactregistry: required API artifactregistry.googleapis.com is enabled
i  functions: Loading and analyzing source code for codebase default to determine what to deploy
Serving at port 8875
shutdown requested via /__/quitquitquit
Error: An unexpected error has occurred.

Debug Information:

I also ran the deploy command with the --debug option to get more details. The debug log is quite extensive, including various API calls and their responses. Here is a snippet of the debug log around the time the error occurred:

... 
[debug] [2023-09-19T01:45:05.303Z] Could not find functions.yaml. Must use http discovery 
[debug] [2023-09-19T01:45:05.307Z] Found firebase-functions binary at '/Users/User2/Desktop/Desktop/LINE-shift/node_modules/.bin/firebase-functions' 
[info] Serving at port 8149 
[debug] [2023-09-19T01:45:05.478Z] Got response from /__/functions.yaml {"endpoints":{"server":{"platform":"gcfv1","availableMemoryMb":null,"timeoutSeconds":null,"minInstances":null,"maxInstances":null,"ingressSettings":null,"serviceAccountEmail":null,"vpc":null,"region":[null],"httpsTrigger":{},"entryPoint":"server"}},"specVersion":"v1alpha1","requiredAPIs":[]} 
[info] shutdown requested via /__/quitquitquit 
[debug] [2023-09-19T01:45:10.643Z] TypeError: Cannot read properties of null (reading 'match') at resolveString (/opt/homebrew/lib/node_modules/firebase-tools/lib/deploy/functions/params.js:31:27) at /opt/homebrew/lib/node_modules/firebase-tools/lib/deploy/functions/params.js:47:36 at Array.map (<anonymous>) at Object.resolveList (/opt/homebrew/lib/node_modules/firebase-tools/lib/deploy/functions/params.js:47:21) at toBackend (/opt/homebrew/lib/node_modules/firebase-tools/lib/deploy/functions/build.js:180:30) at Object.resolveBackend (/opt/homebrew/lib/node_modules/firebase-tools/lib/deploy/functions/build.js:73:23) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async prepare (/opt/homebrew/lib/node_modules/firebase-tools/lib/deploy/functions/prepare.js:68:62) at async chain (/opt/homebrew/lib/node_modules/firebase-tools/lib/deploy/index.js:38:9) at async deploy (/opt/homebrew/lib/node_modules/firebase-tools/lib/deploy/index.js:95:5) 
[error] 
[error] Error: An unexpected error has occurred. 

Despite these efforts, the issue persists. I am looking for guidance on how to resolve this unexpected error. Has anyone faced a similar issue or can provide insights on what might be going wrong here?

Thank you in advance for your help!

What I have tried:
Updating Firebase tools to the latest version
Rebooting my PC