scenarios deploying GCP Cloud Functions with Node.js 16 runtime using Firebase Admin SDK: 'how to find module'
I've been researching this but I'm trying to deploy a Cloud Function to GCP using the Node.js 16 runtime, and I keep running into an behavior: `want to find module 'firebase-admin'`. I've already installed the Firebase Admin SDK as a dependency in my project using `npm install firebase-admin`. My `package.json` looks like this: ```json { "name": "my-cloud-function", "version": "1.0.0", "main": "index.js", "dependencies": { "firebase-admin": "^10.0.0" } } ``` I am deploying the function with the following command: ```bash gcloud functions deploy myFunction --runtime nodejs16 --trigger-http --allow-unauthenticated ``` However, after the deployment, when I try to invoke the function, I get the behavior: `behavior: want to find module 'firebase-admin'`. I've verified that `node_modules` is included in the source directory being deployed, and I am also using the correct working directory for deployment. I even tried deleting the `node_modules` directory and re-running `npm install` to ensure everything was correctly in place, but the scenario continues. Additionally, I checked the structure of my project: ``` /my-cloud-function â âââ index.js âââ package.json âââ node_modules ``` The `index.js` file has the following code: ```javascript const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(); exports.myFunction = functions.https.onRequest((req, res) => { res.send("Hello from Firebase!"); }); ``` I've also tried updating my `gcloud` SDK to the latest version to see if that helps, but no luck. Is there anything I might be missing, or is there a specific configuration I need to set for the Cloud Function to recognize the `firebase-admin` module? Any insights would be greatly appreciated! I'm coming from a different tech stack and learning Javascript. Thanks in advance!