I have already deployed my website there is no error on my localhost and everything works fine but when i deployed it in netlify it only showed white page with no error why is it this is my netlify link =
https://portofolionessa.netlify.app/
and the error that I got from the insepction from chrome in this site is
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
this is the repository that I used to deploy = GitHub - vanessalaurel/portofolioessa
please kindly help me
@laurel_vanessa29 The message in the developer console of:
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.
Is because your file isn’t compiled, if you view the source you’ll see:
Your file isn’t compiled because you’ve either not run your build, or haven’t set your Publish Directory correctly.
At the moment, you’re deploying your source files, which is why files like these can be viewed:
https://portofolionessa.netlify.app/vite.config.js
https://portofolionessa.netlify.app/package.json
You need to set your Build Configuration.
You’ll want something like:
Build Command = npm run build
Publish Directory = dist
where should I type it the build command and publish directory?
Did you view the documentation I linked to?
what should I input to the base directory, package directory and function directory? and should I run npm run build in my local host? I am confused
Nothing.
I didn’t supply them intentionally, since you don’t need them.
Only if you wanted to run the build locally.
It’s not a necessary step for deployment.
and then after that what should I do?
Run your build.
Push a change to your repository, or use the button in the Netlify UI.
it still have the same error when I see the site
Because you haven’t run your build.
Changing the build configuration doesn’t run a build.
So you’re still looking at the result of the previous deployment.
there is no button to run the build
so I don’t need to change anything in my github repo , i just need to retry deploy ?
Correct.
The changed build settings will not take effect until a fresh build/deployment.
You don’t need to change anything in the repository, but as I mentioned if you did create a new commit in the repository that would trigger a build.
So it’s an alternative way to trigger the build if you cannot figure the Netlify UI out.
but I am trying to retry deploy and I can not find any button? how am I supposed to do it?
Note: I don’t personally host with Netlify, so cannot give you precise instructions or screenshots.
That’s because you’re in the wrong spot in the UI.
You appear to be in some “top level management” area, not the area for the site you’re working with.
By going to the correct location in the UI.
I’m taking a bit of a wild guess, but:
- Go to ‘Sites’ (not ‘Builds’)
- Go to the site you’re working with
- Go to the deploys for that site
- Use the button that I previously provided a link to the documentation for
oh okay found it it works thank you so much for your help it means a lot !!!