The Error Msg :
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
TypeError: Failed to fetch dynamically imported module: .../_app/immutable/entry/start.CucgM_a0.js
I created a Sveltekit skeleton project and built it with adapter-static. It was fine on the first deploy, but I got an error on the second deploy. When I try ‘firebase serve’, it still works fine.
What i tried:
- delete all my cache >> nothing happend
- change firbase.json >> error msg changed to “SyntaxError: Unexpected token ‘<‘” but still got same error. can’t find js file.
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"hosting": {
"public": "svt/build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"headers": [
{
"source": "**/*.@(js|mjs)",
"headers": [
{
"key": "Content-Type",
"value": "application/javascript"
},
{
"key": "Cache-Control",
"value": "no-cache"
}
]
}
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"storage": {
"rules": "storage.rules"
}
}
firbase deploy log:
{"files":{"/index.html":"767346ca7b9e1872b79fc4675a9970f4fd716a7a16931fbad194ac02eb8f8f0b",
"/favicon.ico":"46c8fd3731e4d1e9771409696534547ae4ccc15ce4ee369d98ac5efb38b1bcbf",
"/_app\version.json":"c7c7efdf34cabbe83efaa7d9b42328f3dfe1e25e7f5e8f0090aa696c42f45dd9",
"/_app\env.js":"3ffd46bb8de73b33cd1b3c9d4c70f34ec7449a8dd4dc114fa33627779883aaf5",
...
please, help!!!!
New contributor
yelimpark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.