This project is a copy of Google's tutorial: https://firebase.google.com/docs/functions/get-started?gen=2nd with add message function, but without make upper case function.
I tested this with Node.js v18.19.0 and other tools below.
npm install firebase-functions@latest firebase-admin@latest --save
npm install -g firebase-tools
npm ls
ho@ /Users/ho
├── firebase-admin@12.1.0
└── firebase-functions@5.0.0