Angular 5+AngularFire2环境下Firestore版本兼容错误求助
Hey Wayne, sorry to hear you're stuck with this frustrating Firestore error after cloning your project to a new machine. Let’s walk through some initial checks first, then I’ll list out the specific details you can share to help narrow this down further.
Initial Quick Checks
Since your project works on one machine but breaks on the cloned copy, let’s start by ruling out environment or dependency mismatches:
- Verify Node.js versions: Run
node -von both machines—different Node versions can lead to subtle differences in how dependencies are installed or executed. - Check lock file consistency: Make sure your
package-lock.json(oryarn.lockif using Yarn) was cloned properly. If the new machine installed dependencies without using the lock file, you might have slightly different versions of AngularFire2, Firebase, or ngx-pwa-localStorage that are causing compatibility gaps. Try reinstalling dependencies using the lock file to force exact version matches.
Details to Share for Further Diagnosis
To dig deeper into this error, could you provide the following:
- The exact versions of
angularfire2,firebase, andngx-pwa-localStoragelisted in yourpackage.json - Output of
node -vandnpm -v(oryarn -v) from both machines - The exact command you used to install dependencies on the new machine
- When the error occurs: Does it pop up immediately on project start, or only when you perform a specific action (like fetching data from Firestore)?
- The full error stack trace from your browser console or terminal—not just the assertion message, but the preceding lines that show where the error originated
- Any code snippets where you’re using
ngx-pwa-localStoragealongside Firestore operations (this could help spot potential conflicts between local storage mechanisms)
A quick note on the error itself: This Firestore internal assertion typically relates to conflicts with local cache versions. Since you’re using ngx-pwa-localStorage, it’s possible there’s an unintended interaction with Firestore’s own local caching system, but we’ll need the above details to confirm.
内容的提问来源于stack exchange,提问作者Wayne Kaskie

