Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Error when for 0.4.4. Refused to execute script from "*.js" because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. #283

Closed
rojectsky opened this issue Nov 28, 2014 · 10 comments

Comments

@rojectsky
Copy link

Hi Guys, was working good with 0.3.3. but got bellow error with 0.4.0.

Refused to execute script from 'http://localhost:3000/modules/core/controllers/header.client.controller.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
meanjs0 4 error

I am using window 8.1. node js v0.10.24.

@Tester04
Copy link

Hi

I am also facing the same problem:
I downloaded MEAN.JS 0.4.0 branch from github and did the following things:

npm install - successful (No Errors)
grunt - MEAN.JS application started on port 3000

then I opened chrome instance and accessed the application with the url : localhost:3000

what I get is always a blank page. I see the view page source , everything is looking fine but the UI is not rentered and it is blank. why?
Please help me.

Chrome cons0le error:

localhost/:1 Refused to execute script from 'http://localhost:3000/modules/core/app/config.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/core/app/init.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/articles/articles.client.module.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/chat/chat.client.module.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/core/core.client.module.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/users/users.client.module.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/articles/config/articles.client.config.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/articles/config/articles.client.routes.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/articles/controllers/articles.client.controller.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/articles/services/articles.client.service.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/chat/config/chat.client.config.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/chat/config/chat.client.routes.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/chat/controllers/chat.client.controller.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/core/config/core.client.routes.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/core/controllers/header.client.controller.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/core/controllers/home.client.controller.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/core/services/menus.client.service.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/core/services/socket.io.client.service.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/users/config/users.client.config.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/users/config/users.client.routes.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/users/controllers/authentication.client.controller.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/users/controllers/password.client.controller.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/users/controllers/settings.client.controller.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/users/controllers/settings/change-password.client.controller.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/users/controllers/settings/change-profile-picture.client.controller.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/users/controllers/settings/edit-profile.client.controller.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/users/controllers/settings/manage-social-accounts.client.controller.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/users/controllers/settings/settings.client.controller.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/users/services/authentication.client.service.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from 'http://localhost:3000/modules/users/services/users.client.service.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
7livereload.js:191 WebSocket connection to 'ws://localhost:35729/livereload' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

Firefox console error:

The stylesheet http://localhost:3000/modules/users/css/users.css was not loaded because its MIME type, "text/html", is not "text/css". localhost:3000
The stylesheet http://localhost:3000/modules/chat/css/chat.css was not loaded because its MIME type, "text/html", is not "text/css". localhost:3000
The stylesheet http://localhost:3000/modules/core/css/core.css was not loaded because its MIME type, "text/html", is not "text/css". localhost:3000
SyntaxError: syntax error config.js:1
SyntaxError: syntax error init.js:1
SyntaxError: syntax error articles.client.module.js:1
SyntaxError: syntax error chat.client.module.js:1
SyntaxError: syntax error core.client.module.js:1
SyntaxError: syntax error users.client.module.js:1
SyntaxError: syntax error articles.client.config.js:1
SyntaxError: syntax error articles.client.routes.js:1
SyntaxError: syntax error articles.client.controller.js:1
SyntaxError: syntax error articles.client.service.js:1
SyntaxError: syntax error chat.client.config.js:1
SyntaxError: syntax error chat.client.routes.js:1
SyntaxError: syntax error chat.client.controller.js:1
SyntaxError: syntax error core.client.routes.js:1
SyntaxError: syntax error header.client.controller.js:1
SyntaxError: syntax error home.client.controller.js:1
SyntaxError: syntax error menus.client.service.js:1
SyntaxError: syntax error socket.io.client.service.js:1
SyntaxError: syntax error users.client.config.js:1
SyntaxError: syntax error users.client.routes.js:1
SyntaxError: syntax error authentication.client.controller.js:1
SyntaxError: syntax error password.client.controller.js:1
SyntaxError: syntax error settings.client.controller.js:1
SyntaxError: syntax error change-password.client.controller.js:1
SyntaxError: syntax error change-profile-picture.client.controller.js:1
SyntaxError: syntax error edit-profile.client.controller.js:1
SyntaxError: syntax error manage-social-accounts.client.controller.js:1
SyntaxError: syntax error settings.client.controller.js:1
SyntaxError: syntax error authentication.client.service.js:1
SyntaxError: syntax error users.client.service.js:1

@Way
Copy link

Way commented Dec 2, 2014

Having the same problem since a few days. I guess at least one of the node or bower packages has been updated in that time and breaks something because I recently deployed a version on heroku that works.

@JonVisc
Copy link

JonVisc commented Dec 2, 2014

This is on the windows environment. I haven't seen it happen on OSX.

@karan-kapoor90
Copy link

Does anyone have a fix on it yet?

On Wed, Dec 3, 2014 at 4:49 AM, Jonathan Romanowski <
notifications@github.com> wrote:

This is on the windows environment. I haven't seen it happen on OSX.


Reply to this email directly or view it on GitHub
#283 (comment).

@NeverOddOrEven
Copy link
Contributor

NeverOddOrEven pushed a commit that referenced this issue Jan 7, 2015
Fix #283 & #321 path issues [+1 for Windows]
pdfowler pushed a commit to pdfowler/mean that referenced this issue Jan 19, 2016
…meanjs_0_4_0_merge

* commit '709c27f9753ed09daf417d5f8d46ffd3293481f0':
  Wait for async saving and removing
  Change file ignore pattern to match word 'core' instead of chars
  Add missing newline at the end of text files
  Remove executable bit when not necessary
  Remove dist files 0.4.0
  Adjust profile image URLs on Fb and Twitter strategies
  Auth service
  Remove username from facebook strategy
  Fix meanjs#321 image paths in social meta tags [v0.4]
  Fix meanjs#283 glob path issue for Windows
  Because html5Mode is enabled, the links the social buttons point to will not work, the request to /api/auth/{provider} will be captured by ui-router and directed back to /. Adding target="_self" to each link will fix this issue. Maybe creating a new directive for links to hit server side endpoints would be more appropriate but this should do for now.

Conflicts:
	.gitignore
	Dockerfile
	config/assets/default.js
	modules/core/client/config/core.client.routes.js
	modules/core/client/controllers/home.client.controller.js
	modules/core/server/controllers/errors.server.controller.js
	modules/core/server/views/404.server.view.html
	modules/core/server/views/500.server.view.html
	modules/core/server/views/layout.server.view.html
	modules/users/client/controllers/authentication.client.controller.js
	modules/users/client/controllers/password.client.controller.js
	modules/users/client/services/authentication.client.service.js
	modules/users/client/services/users.client.service.js
	modules/users/client/views/authentication/authentication.client.view.html
	modules/users/server/config/strategies/local.js
	modules/users/server/controllers/users/users.authorization.server.controller.js
	modules/users/server/templates/reset-password-email.server.view.html
	public/dist/application.min.css
	public/dist/application.min.js
@a-lucas
Copy link

a-lucas commented Jul 13, 2016

Still got the same issue on linux

@codydaig
Copy link
Member

@a-lucas This ticket is VERY old. Please open a new issue and describe in detail with error messages what is going on and how we can replicate it.

@limingyangit
Copy link

I have same issue,because I am not careful of losting the JS file.

@bahmutskyi
Copy link

Still having the issue in 2018, please help

@travega
Copy link

travega commented Jul 5, 2018

I'm still having this issue in 2018 too! Please help me also :)

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

No branches or pull requests