Webstorm cant resolve firebase 9 imports
My problem is that my IDE (WebStorm) doesn't recognize Firebase imports. It throws the following error:
Cannot resolve symbol getFirestore.
Here are my imports:
import { initializeApp, getApps } from "firebase/app";
import {
getAuth,
setPersistence,
browserSessionPersistence,
} from "firebase/auth";
import { getAnalytics } from "firebase/analytics";
import { getFirestore } from "firebase/firestore";
The code works as it should, but Webstorm just cant recognize the imports, which also means that I get to autocompletion etc...
I've tried doing "invalidate cache and restart"
I've tried deleting node_modules and package.lock.json and reinstalled everything
I have the latest Webstorm version installed
It's a Vue3 project with the default Typescript setup coming from Vue Cli
Please sign in to leave a comment.
The
@firebase
module all the stuff is re-exported from is not listed as a dependency/devDependency in apackage.json
and thus is not indexed by default. You need markingnode_modules/@firebase
as Not excluded (Mark directory as/Not excluded from the folder right-click menu) to make this workI havent got the possibility to mark it as not excluded ?
Please try
marking
node_modules/@firebase
and notnode_modules/firebase
- the latter is already indexedPerfect, that worked... Thx a bunch
It doesn't work for firebase:9.1.3 - WebStorm 2021.2.3
It still imports from wrong source.
