title: Heroku app only works on Chrome Desktop // React.Js Application
body: <p>Recently finished putting together a React project that fetches News Articles and displays them. Recently deployed to Heroku and have found that only Chrome on Desktop seems to run it. </p>
  
  <p>Safari and Firefox both give me the same error when I look in the Javascript console.<a href="https://i.stack.imgur.com/RKPfj.png" rel="nofollow noreferrer">Javascript error</a></p>
  
  <p>Link to heroku applicatio - <a href="https://calm-bastion-47290.herokuapp.com/" rel="nofollow noreferrer">https://calm-bastion-47290.herokuapp.com/</a>?</p>
  
  <p><strong>Server set up</strong></p>
  
  <pre><code>    const express = require("express");
  const mongoose = require("mongoose");
  const bodyParser = require("body-parser");
  const passport = require("passport");
  const path = require("path");
  
  const users = require("./routes/api/users");
  const profile = require("./routes/api/profile");
  
  const app = express();
  // Body Parser Middleware
  app.use(express.urlencoded({ extended: false }));
  app.use(express.json());
  
  // DB config
  const db = require("./config/keys").mongoURI; //mongodb database url connection
  
  // connect to mongodb
  mongoose
    .connect(db)
    .then(() =&gt; console.log("MongoDB Connected"))
    .catch(err =&gt; console.log(err));
  
  //passport Middleware
  
  app.use(passport.initialize());
  
  //passport config
  require("./config/passport")(passport);
  
  //use routes
  
  app.use("/api/users", users);
  app.use("/api/profile", profile);
  
  // Server static assets if in production
  if (process.env.NODE_ENV === "production") {
    // Set static folder
    app.use(express.static("client/build"));
  
    app.get("*", (req, res) =&gt; {
      res.sendFile(path.resolve(__dirname, "client", "build", "index.html"));
    });
  }
  
  const port = process.env.PORT || 5000;
  
  app.listen(port, () =&gt; console.log(`Server running on port ${port}`));
  </code></pre>
  
  <p>I don't think there is anything wrong with my code as it runs perfectly locally and chrome handles it just fine. Any obvious reason why Safari, Firefox and any browser on mobile simply fails to render any part of my web application?</p>