Here is my netlify site. Am using Node js React and vite as the build tool. The project has two folders a client and server folder. The server folder is hosted in render.com and client is hosted on netlify. Here is the link
/src/main.jsx:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “application/octet-stream”. Strict MIME type checking is enforced for module scripts per HTML spec.
i have even run npm run build and am using dist as the publish directory but the error is still persistent. Help me resolve this issue
Thanks alot the solution worked. Turns out when I build the app the dist folder was listed in gitignore file thus no changes would happen when i commited
@lithium It’s normal for the dist folder to be in the .gitignore, there’s no need to have the build output in the repository, as it gets produced when the build occurs.
You would only have the build output in the repository if you weren’t building on Netlify, if you were building locally for example, committing the build output, then having Netlify deploy that without building.