Aurelia on Heroku, JSPM's system.js "blocked due to MIME type mismatch"

246 Views Asked by At

I'm trying to host a simple (Typescript) Aurelia app on Heroku with a very simple Express server, but when I spin it up I get the following error in Firefox:

The resource from “https://ub-edis.herokuapp.com/jspm_packages/system.js” was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff).

and then all sorts of subsequent errors because the code obviously can't resolve System.

Running this code locally works perfectly well. Since I'm not sure how to configure Heroku to install my JSPM and Typings dependencies, I'm using dropbox to upload my repo. So I just copy and pasted my whole project directory over (I know this isn't ideal, but I'm just a newby trying to get this thing to work with minimal effort, not to produce production code). If I look under the Sources tab in the Chrome dev tools it finds my config.js correctly, so I don't think I'm getting the error because it can't find system.js.

This is my index.html:

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>EDIS</title>
  </head>
  <body aurelia-app="main">
    <h1>Loading...</h1>
    <script src="jspm_packages/system.js" type="text/javascript"></script>
    <script src="config.js" type="text/javascript"></script>
    <script type="text/javascript">
      System.import('aurelia-bootstrapper');
    </script>
  </body>
</html>

I'm a little out of my depth with this, so any help would be greatly appreciated!

0

There are 0 best solutions below