Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load module script: Expected a JavaScript module script #16736

Closed
3 of 7 tasks
simplepry-s opened this issue May 21, 2024 · 0 comments
Closed
3 of 7 tasks

Failed to load module script: Expected a JavaScript module script #16736

simplepry-s opened this issue May 21, 2024 · 0 comments

Comments

@simplepry-s
Copy link

simplepry-s commented May 21, 2024

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

react 18.2.0, typescript 5.4.5,  node v18.20.2 , 
vite 5.2.9

Used Package Manager

npm

Logs

No response

Validations

@vitejs vitejs locked and limited conversation to collaborators May 22, 2024
@sapphi-red sapphi-red converted this issue into discussion #16746 May 22, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

1 participant