You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.
The problem seems to be because __webpack_hmr is serving the SPA app instead of the EventSource, but I'm not sure how to fix this.
My Startup file looks like this:
if(env.IsDevelopment()){app.UseDeveloperExceptionPage();if(context.Configuration.EnableDevelopmentWebInterface){app.UseWebpackDevMiddleware(newWebpackDevMiddlewareOptions{HotModuleReplacement=true,ProjectPath=ClientAppPath,ConfigFile=$"{ClientAppPath}build/webpack.dev.conf.js"});}}else{app.UseExceptionHandler("/Home/Error");}// add wwwroot/app.UseStaticFiles();// set up Nancy OWIN hostingapp.UseOwin(x =>x.UseNancy(options =>{options.PassThroughWhenStatusCodesAre(HttpStatusCode.NotFound,HttpStatusCode.InternalServerError);options.Bootstrapper=newSpeercsBootstrapper(context);}));// set up MVC fallbackapp.UseMvc(routes =>{routes.MapRoute(name:"default",template:"{controller=Home}/{action=Index}/{id?}");routes.MapSpaFallbackRoute(name:"spa-fallback",defaults:new{controller="Home",action="Index"});});
Unfortunately this is not something I can diagnose given the info here and your custom project setup. I don't know what effect the Nancy middleware might have, for example, or about what publicPath values you're using, what PathBase values are in effect, and so on. Can you compare against the project produced by dotnet new vue to establish which of your differences is making this not work?
Sorry that's not incredibly useful. The ideal thing would be if you could use a debugger to step into the SpaServices code to see where it sets up the listener for __webpack_hmr and find out if it's listening on some other path, for example. However I'm not sure there's a convenient way to do that besides cloning the whole of this repo and connecting your app to it as a <ProjectReference> instead of a <PackageReference>. If it comes to it, that might be your best bet to find out what's going on!
I'm getting this error:
EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.
The problem seems to be because
__webpack_hmr
is serving the SPA app instead of the EventSource, but I'm not sure how to fix this.My Startup file looks like this:
and my Webpack config:
The text was updated successfully, but these errors were encountered: