0

I am trying to deploy an app to App Engine for a mobile version on the Default app. I did the "ng build" on the Default service and everything went well. then came time to do the same for the mobile version went and deployed the app and i keep getting the same error in the console.

Loading module from “https://m.ex.emample.com/main-es2015.XXXXXXXXXXXXXXXXXX.js” was blocked because of a disallowed MIME type (“text/html”).

I keep thinking something was wrong with the build but i am not sure. I did everything the same, all i did was change the CSS and HTML of the Components.

There is no server.js file just an app.yaml that is the same as the Default that works fine.

Nova Nova
  • 35
  • 5
  • 1
    Can you check that the extensions of your JS, CSS and HTML are strictly .js, .css and .html. Windows sometimes saves the file as .html.txt Also check that the file exists at the specified path. – Juancki Mar 24 '20 at 09:34
  • For some reason. That's one of the messages i get. I figured i did ng build on 2 seperate versions of angular. So the forst one version 7 does not build with an es2015 file. The other being 8/9 does. I deployed to a service thats not default and it does not work i did the build about 10 times to get only one file missing. Odd part, when i deploy the Default Service build to App Engine as the secondary service. All works well. Very odd stuff. – Nova Nova Mar 24 '20 at 19:21
  • I do not quite follow with this previous message, did you resolve your issue? – Juancki Mar 27 '20 at 15:34
  • No i did not. I compilled two projects. All i did was alter the component templates. Each time, i get the same issue. One works fine and the other has a MIME type issue. Where it keeps saying main.es5.. can't be found. – Nova Nova Mar 28 '20 at 05:08
  • I found some posts that could be related with your issue, such as [this](https://stackoverflow.com/questions/58254370/how-to-send-headers-in-express-mean) and [this](https://stackoverflow.com/questions/58088076/node-server-loading-module-was-blocked-because-of-a-disallowed-mime-type-text). Please, let me know if they have been of any help. – Artemis Georgakopoulou Apr 02 '20 at 15:49
  • Thank, but, i do not use a server.js file. App Engine seems to take care of that, though i use an app.yaml file aswell as a dispatch.yaml file. I searched through the es2015 file and saw that the build that works there is no reference to "text/html" that is unlike the build that does not work. May be a build error. – Nova Nova Apr 04 '20 at 05:34

0 Answers0