Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
433 views
in Technique[技术] by (71.8m points)

javascript - Getting MIME type errors with MEAN stack project while deploying it

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. enter image description here

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

enter image description here

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...