I'm currently in the process of developing a react application using typescript, aiming to host it on firebase. To utilize cloud storage for serving content and testing locally before deployment, I am working on setting up the storage emulator.
Following the instructions provided at: https://firebase.google.com/docs/emulator-suite/connect_storage, I am trying to implement the recommended storage emulator hook:
import { getStorage, useStorageEmulator } from "firebase/storage";
However, when attempting to use the hook, I encounter the following error from typescript:
Attempted import error: 'useStorageEmulator' is not exported from 'firebase/storage'.
The documentation mentions that this issue may be due to the new v9 sdk: https://firebase.google.com/docs/web/modular-upgrade.
I have experimented with different versions like ^9.0.1
, 9.0.0
, and ^9.0.0-beta.8
without success. As per my investigation, there seems to be no export named useStorageEmulator
in the specified file, making me uncertain if the problem lies within my implementation or setup.
Your assistance in resolving this matter would be greatly appreciated.