firebasereact-nativeexpometro-bundlerexpo-web

@expo/vector-icons not showing on the app hosted as web project in firebase


I have an React Native code which I wanted to host on Firebase as a Web app. I've achieved this using the Expo for web. When I deployed the code to Firebase getting console and network error and the icons are not showing. But able to view the icons when the app runs locally.

Tried the suggestions provided in https://github.com/expo/expo/issues/21568 still facing the same. error icon missing local hosted site


Solution

  • One thing that worked for me.

    1. Delete the .firebase folder if you have that
    2. Then, in firebase.json file, remove node_modules from ignore part:

    By default you should see something like this:

    "hosting": {
      // ...
      "ignore": [
         "firebase.json",  // the Firebase configuration file (the file described on this page)
         "**/.*",  // files with a leading period should be hidden from the system
         "**/node_modules/**"  // contains dependencies used to create your site but not run it
      ]
    }
    

    So just remove the node_modules part:

    "hosting": {
      // ...
      "ignore": [
         "firebase.json", 
         "**/.*"
      ]
    },
    
    1. Deploy hosting again

    2. One more thing, check if this works in an incognito window, to avoid cache things.

    Hope it helps!