title: firebase storage ref is not a function
body: <p>Im new in web development . i tried to find an answer all over the internet in the past 24 hours without success and now im reaching out here</p>
  <p>this is my err :</p>
  <p><strong>Uncaught TypeError: <em>firebase__WEBPACK_IMPORTED_MODULE_3</em>_.storage.ref is not a function</strong></p>
  <p>this is the firebase.js file :</p>
  <pre><code>import { initializeApp } from 'firebase/app';
  import { getStorage } from 'firebase/storage';
  
  
  const firebaseConfig = {
      apiKey: &quot;&quot;,
      authDomain: &quot;&quot;,
      projectId: &quot;&quot;,
      storageBucket: &quot;&quot;,
      messagingSenderId: &quot;&quot;,
      appId: &quot;&quot;
  };
  
  const app = initializeApp(firebaseConfig);
  
  export const storage = getStorage(app);
  </code></pre>
  <p>and im importing the storage in the component like that :</p>
  <pre><code>import {storage} from &quot;../../firebase&quot;;
  </code></pre>
  <p>this is the upload func :</p>
  <pre><code>    const upload = (items) =&gt; {
      items.forEach((item) =&gt; {
          const fileName = new Date().getTime() + item.label + item.file.name;
          const uploadTask = storage.ref(`/items/${fileName}`).put(item.file);
          uploadTask.on(
              &quot;state_changed&quot;,
              (snapshot) =&gt; {
                  const progress =
                      (snapshot.bytesTransferred / snapshot.totalBytes) * 100;
                  console.log(&quot;Upload is &quot; + progress + &quot;% done&quot;);
              },
              (error) =&gt; {
                  console.log(error);
              },
              () =&gt; {
                  uploadTask.snapshot.ref.getDownloadURL().then((url) =&gt; {
                      setMovie((prev) =&gt; {
                          return { ...prev, [item.label]: url };
                      });
                      setUploaded((prev) =&gt; prev + 1);
                  });
              }
          );
      });
  };
  </code></pre>
  <p>any suggestions ?</p>