Recently I encountered the above error (TypeError: module.exports.v1 is not a constructor) when trying to run firebase-firestore related tests. Earlier I had no issue running the tests but after doing a npm install
was getting the above error.
The source of the error is from google-cloud/firestore
which is required by firebase-admin
.
Tried several options but it doesn't seems to get resolved. I then tried with an older node-module and it worked as expected.
The problem was due to the test framework I've been using. Once I changed from jest to mocha the problem got solved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With