Solution skill
Module not found: Default condition should be last one
Complete solution
Shows how to fix module not found: Default condition should be last one. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
For "Module not found: Default condition should be last one > 1 | import { initializeApp, getApps, getApp } from 'firebase/app'; 2 | import { get": upgrade to Firebase 9.17.1.
Module not found: Default condition should be last one > 1 | import { initializeApp, getApps, getApp } from 'firebase/app'; 2 | import { getAnalytics, isSupported } from 'firebase/analytics'; 3 | import { getAuth } from 'firebase/auth';Steps
- Issue firebase/firebase-js-sdk#7005 (closed, 42 comments): ### Describe your environment Operating System version: macOS Monterey 12.4 Browser version: Google Chrome 109.0.5414.119 Firebase SDK version: 9.17.0 Firebase Product: any ### Describe the problem When installing the version
9.17.0, I was getting this error on the import:
2. Doesn't matter the order of the imports. ### `Rolling back to the 9.16.
3. Upgrade to Firebase 9.17.1. If the upgrade alone does not clear it, remove the stale state first: delete node_modules, clear the lockfile state (or the cached modules), and reinstall cleanly. The reporter confirmed the failure went away after 9.17.1 plus a clean reinstall.
## When to use
Use this skill when you run into "Module not found: Default condition should be last one".
## When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
## Versions
Versions mentioned in the source: Chrome 109.0.5414.119, 9.17.0, Firebase 9.17.1. If you are on something much newer or older, the details may have shifted.
## Variants
Other phrasings of the same problem that show up in reports:
### `` Module not found: Default condition should be last one > 1 | import { initializeApp, getApps, getApp } from 'firebase
```text
``` Module not found: Default condition should be last one > 1 | import { initializeApp, getApps, getApp } from 'firebase/app'; 2 | import { getAnalytics, isSupported } from 'firebase/analytics'; 3 | import { getAuth } from 'firebase/auth'; ```Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
In gh:firebase/firebase-js-sdk#7005 (Firebase), the issue reported was: Issue firebase/firebase-js-sdk#7005 (closed, 42 comments): ### Describe your environment Operating System version: macOS Monterey 12.4 Browser version: Google Chrome 109.0.5414.119 Firebase SDK version: 9.17.0 Firebase Product: any ### Describe the problem When installing the version 9.17.0, I was getting this error on the import: `` Module not found: Default condition should be last one > 1 | import { initializeApp, getApps, getApp } from 'firebase/app'; 2 | import { getAnalytics, isSupported } from 'firebase/analytics'; 3 | import { getAuth } from 'firebase/auth'; Doesn't matter the order of the imports. ### Rolling back to the 9.16. The verified resolution from the thread: Upgrade to Firebase 9.17.1. If the upgrade alone does not clear it, remove the stale state first: delete node_modules, clear the lockfile state (or the cached modules), and reinstall cleanly. The reporter confirmed the failure went away after 9.17.1 plus a clean reinstall. Source: mount the host path https at container path //github.com/firebase/firebase-js-sdk/issues/7005
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_9lgMewquCpoVyviWhMkQ2Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Module not found: Default condition should be last one <span>— Vectle</span></a>