Getting MIME type errors with MEAN stack project while deploying it

…衆ロ難τιáo~ 提交于 2019-11-27 07:27:19

问题


My question is strictly related to the deployment. My code is good. At first I asked this question, please read that question as well. I have given detailed info about the project there also. However, I got some good response and I followed these steps from the same:

  1. You have to use ng build --prod for compile your development file.
  2. Then you need to setup your node.js file.
  3. Then just upload all the server files and dist folder to server.
  4. And run the server using pm2 .
  5. And run just pm2 start server.js

Everything looks good. pm2 is also doing its job.

But my web page is absolutely blank with three errors on the console.. Only the project title is there on the browser tab.

Those three errors are:

Loading module from “http://localhost:3000/runtime-es2015.858f8dd898b75fe86926.js” was blocked because of a disallowed MIME type (“text/html”).

Loading module from “http://localhost:3000/polyfills-es2015.5728f680576ca47e99fe.js” was blocked because of a disallowed MIME type (“text/html”).

Loading module from “http://localhost:3000/main-es2015.3f40e4ee14a8137ebfaa.js” was blocked because of a disallowed MIME type (“text/html”).

I have tried this on both chrome and firefox. Please tell me where I failed.

来源:https://stackoverflow.com/questions/57978442/getting-mime-type-errors-with-mean-stack-project-while-deploying-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!