Skip to content
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

MIME type error #31

Open
karlnoelle opened this issue Jul 20, 2018 · 2 comments
Open

MIME type error #31

karlnoelle opened this issue Jul 20, 2018 · 2 comments

Comments

@karlnoelle
Copy link

I found the following issue:

I'm getting a Refused to execute script from '<URL>' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. error and can't seem to get the pattern library to see the files in /js.

Just wondering if there's something that could be done. I'm trying to add some javascript to build out more patterns but am stuck at this spot. Googling the error code hasn't led to any specific fix that would work with the way this pattern library app is setup. The app seems to run fine but the included js files aren't being seen:
image

Explicitly setting type="application/javascript" hasn't helped either.

Any help would be greatly appreciated!

@mbulfair
Copy link
Member

I've had the same issue, it's when the files referenced do not exist on the file system, the project will still work though. I have yet to find a solution in the dev server for this.

@Roralee
Copy link

Roralee commented Aug 28, 2018

It might not necessarily be that the files don't exist, it could very well be that the files aren't where the system expects them to be. I know I had a rough time getting the mapping config'd properly for the compile between the source and where to put it.

My first iteration was to find/replace pathing in the compiled public folder.

Ultimately, I ended up writing a gulp task that would update the image pathing for templates and css so it would display correctly in localhost and in the compiled folder.

But I still haven't figure out how to get the patternlab.config to map things to where I need them.

Also, check to make sure that the pathing in the compiled files is right for where the compiled files will live. They're set to look at the site root but if your files are on the server in a subfolder, it won't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants