title: Expected a JavaScript module script but the server responded with a MIME type of "text/html"
body: <p>I have a problem when try to import firebase in my project. Previously i installed firebase dependencies in my project. I'm using ELM-SPA.</p>
  <p>Error</p>
  <p><img src="https://i.stack.imgur.com/OUaoU.jpg" alt="Error" /></p>
  <p>My firebase config file:</p>
  <pre><code>import firebase from 'firebase/app'
  import 'firebase/firestore'
  import 'firebase/auth'
  import 'firebase/storage'
  
  const firebaseConfig = {
      apiKey: &quot;&quot;,
      authDomain: &quot;&quot;,
      projectId: &quot;&quot;,
      storageBucket: &quot;&quot;,
      messagingSenderId: &quot;&quot;,
      appId: &quot;&quot;
    };
  
  
    //init firebase
    firebase.initializeApp(firebaseConfig)
  
    //init services
    const projectFirestore = firebase.firestore()
    const projectAuth = firebase.auth()
    const projectStorage = firebase.storage()
  
  
    //timestamp
    const timestamp = firebase.firestore.FieldValue.serverTimestamp
  
    export{
        projectFirestore,
        projectAuth,
        projectStorage,
        timestamp
    }
  </code></pre>
  <p>Place where i try to call some firebase functions</p>
  <pre><code>import { projectAuth } from '../public/config'
  
  const app = Elm.Main.init({
    flags: JSON.parse(localStorage.getItem('storage'))
  })
  
  app.ports.save.subscribe(storage =&gt; {
    localStorage.setItem('storage', JSON.stringify(storage))
    app.ports.load.send(storage)
  })
  </code></pre>
  <p>My html file:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot;&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;/style.css&quot;&gt;
    &lt;link rel=&quot;shortcut icon&quot; href=&quot;assets/logo.png&quot; /&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;script src=&quot;/dist/elm.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;module&quot; src=&quot;/main.js&quot;&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>