Failed to load module script: Expected a JavaScript module script #16746
Replies: 3 comments 1 reply
-
I have the problem too. |
Beta Was this translation helpful? Give feedback.
-
Any updates? The same problem after app deploy (randomly on page reload or router navigation (5.4.9 or 5.4.10):
UPD: it was a deployment problem in my case |
Beta Was this translation helpful? Give feedback.
-
我也有同样的问题 |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
i got error
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type
when i have new release version (deployment) but when i reload the web page the issue is gone
i try this solution but it now working
https://vitejs.dev/guide/build.html#load-error-handling
here my vite config
export default defineConfig({
plugins: [react()],
base: './',
server: {
port: 3000,
}
resolve: {
alias: {
components: resolve(dirname, 'src/components')
},
},
});
Reproduction
Steps to reproduce
System Info
Used Package Manager
npm
Logs
No response
Validations
Beta Was this translation helpful? Give feedback.
All reactions