I'm getting the following error while trying to deploy any function to firebase functions:
Command:
firebase deploy --only functions
And this is the output
i deploying functions
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...
✔ artifactregistry: required API artifactregistry.googleapis.com is enabled
✔ functions: required API cloudbuild.googleapis.com is enabled
✔ functions: required API cloudfunctions.googleapis.com is enabled
i functions: preparing codebase default for deployment
Error: Failed to load function definition from source: Failed to generate manifest from function source: Error: Cannot find module 'firebase-admin/auth'
I've already tried removing node_modules folder with rm -rf node_modules and npm install with no success.
Firebase tools version: 11.18.0 Node version: v18.12.1 NPM version: 8.19.2
It was properly working only few days ago and suddenly stopped. Does anyone know how to fix this?