I am going through the tutorial for testing Firebase security rules on the Google Shell emulator, when I encounter an error on step 4.5 where it says to npm --prefix=functions test to run the test suite. I get an error saying
test
mocha --timeout 5000 --exit
/home/name/rules-tutorial/quickstart-testing/cswalkthrough/functions/node_modules/mocha/node_modules/yargs/yargs.js:1163
else throw error
Error: Cannot find module 'firebase/compat/database'
Require stack:
- /home/name/rules-tutorial/quickstart-testing/cs-walkthrough/functions/node_modules/@firebase/rules-unit-testing/dist/index.cjs.js
How do I solve this?