• Register
0 votes
395 views

Problem :

I am trying to use the reactrouter but i am getting following error
because its mime type ('text/html') is not executable, and strict mime type checking is enabled
6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

To resolve your issue try changing webpack.config.js add publicPath as shown below

output: {
   path: path.join(__dirname, 'public'),
   filename: 'bundle.js',
   publicPath: '/',        
}

9 7 4
38,600 points

Related questions

0 votes
1 answer 7 views
7 views
Problem: Refused to execute script from 'http://localhost:8080/edit/bundle.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. I am using react-router and i got this error while using <Route path="/edit/:id" component={ ... ></div> <script type="text/javascript" src="bundle.js"></script> </body> </html> Please Help me in resolving this issue.
asked Apr 25 ochena 22.1k points
0 votes
1 answer 236 views
236 views
Problem : Encountered mime type error and looking for its solution because its mime type ('text/html') is not executable, and strict mime type checking is enabled.
asked Nov 11, 2019 peterlaw 6.9k points
0 votes
1 answer 32 views
32 views
Problem: because its mime type ('text/css') is not executable, and strict mime type checking is enabled.
asked Feb 23 Muneeb Saadii 130k points
1 vote
1 answer 138 views
138 views
Problem : I am getting mime type error because its mime type ('text/plain') is not executable, and strict mime type checking is enabled.
asked Nov 11, 2019 peterlaw 6.9k points
0 votes
1 answer 11 views
11 views
Problem: strict mime type checking is enabled. As you know its mime type ('text/html') is not executable
asked Feb 23 Muneeb Saadii 130k points
0 votes
1 answer 7 views
7 views
Problem: Failed prop type: The prop history is marked as required in Router, but its value is undefined. Index.js import {render} from 'react-dom'; import {Provider} from 'react-redux'; import { Router, browserHistory } from 'react-router'; import Sstore from './store/ ... 'react-router'; import Home from './components/Home.js'; export default ( <Route path="/" component={Home}> </Route> );
asked Apr 26 sumaiya simi 43.9k points
0 votes
1 answer 209 views
209 views
Problem : I have the javascript application and when I try to run it on firefox I am facing the below error on the console: &ldquo;Because its mime type ('text/html') is not a supported stylesheet mime type&rdquo; Now I am completely confused because of this error. Kindly somebody let me know how can I resolve my above error?
asked Jan 29, 2020 jwilliam 3.9k points
0 votes
1 answer 3 views
3 views
Problem: I am getting this warning every time I sign in, Warning: Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.I think the problem is with my withRouter, how can we access this.props without using withRouter ?
asked 2 days ago sumaiya simi 43.9k points
1 vote
1 answer 60 views
60 views
Problem : I've just started learning React The tutorial I was following uses React-Router 2.0.0, but on my desktop I'm using 4.1.1. Here is my code: var React = require('react'); var ReactDOM = require('react-dom'); var { Route, Router, IndexRoute } ... ') ); When run that code I got this error: Uncaught TypeError: Cannot read property 'pathname' of undefined at new RouterHow can this be solved?
asked Apr 7 Sabbir Hossain 14.6k points
1 vote
1 answer 129 views
129 views
Problem : i'm using React router v^4.0.0, I've been having some trouble with react router. Router.js:43 Uncaught TypeError: Cannot read property 'location' of undefined at new Router (Router.js:43) at ReactCompositeComponent.js:295 at measureLifeCyclePerf ( ... .mountComponent (ReactReconciler.js:46) Any ideas on what I need to do to fix this? Thanks for your patience and help!!
asked Mar 21 Sabbir Hossain 14.6k points