修復JavaScript module script but the server responded with a MIME type of "text/plain" 錯誤


錯誤信息:

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.

 

解決辦法:

注冊表 HKEY_CLASSES_ROOT 有個  .js 項    Content Type=text/plain

改成  Content Type=text/javascript

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 ES6 服務器以非JavaScript MIME類型“text/html”響應 Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". 關於vite build后訪問報錯:Expected a JavaScript module script but the server responded with a MIME type. Resource interpreted as Script but transferred with MIME type text/plain: web頁面 顯示 Resource interpreted as Stylesheet but transferred with MIME type text/plain的錯誤警告 Resource interpreted as Stylesheet but transferred with MIME type text/plain nginx - Resource interpreted as Stylesheet but transferred with MIME type text/plain