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.
2
votes
Possibly a corrupted node_modules directory? Have you tried deleting it (and the package lock file) and reinstalling the dependencies?
– Hiranya Jayathilaka
yes did all the possible stuff. tried with deleting both package-lock and node-modules but the problem still exists
– Supun Muthutantrige
3 Answers
1
votes
1
votes