The nosniff value makes declared media types matter. Fix the response type as well as sending the header.
What nosniff does
X-Content-Type-Options: nosniff asks browsers to use the declared Content-Type instead of guessing a different type. In particular, script and stylesheet loads are blocked when the type is unsuitable for their destination.
This reduces surprises when a response contains something other than the browser was meant to execute. It does not inspect file contents for malicious code or replace safe application output.
A small example
Content-Type: text/javascript; charset=UTF-8
X-Content-Type-Options: nosniffFor a JavaScript response, declare a supported JavaScript media type. CSS needs text/css. HTML, JSON, and downloads need their own appropriate types.
What to check
Inspect the response to the failing asset, including its status and body. An expired login, redirect, or missing file may return HTML at a URL ending in .js. Changing the header alone would hide the real routing problem.
Use the MIME and nosniff troubleshooting steps when a script or stylesheet stops loading. Removing nosniff is usually the wrong first fix.