Comments (5)
yeah I notice that too, will do more test and fix it soon
from koa-webpack-middleware.
I am seeing this issue with [email protected] but the issue is not observed with [email protected]. I am using it with [email protected] & [email protected]. Any clue what I might be missing?
With 1.5.0, I am getting following error:
Error: Can't set headers after they are sent. at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:356:11) at Object.set (**************************************\node_modules\koa\lib\response.js:440:16) at Object.proto.(anonymous function) [as set] (**************************************\node_modules\delegates\index.js:40:31) at Object.setHeader (**************************************\node_modules\koa-webpack-middleware\lib\devMiddleware.js:29:23) at Object.handleRangeHeaders (**************************************\node_modules\webpack-dev-middleware\lib\Shared.js:61:8) at processRequest (**************************************\node_modules\webpack-dev-middleware\middleware.js:63:21) at continueBecauseBundleAvailable (**************************************\node_modules\webpack-dev-middleware\lib\Shared.js:122:6) at Array.forEach (native) at **************************************\node_modules\webpack-dev-middleware\lib\Shared.js:121:9 at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickDomainCallback (internal/process/next_tick.js:122:9)
from koa-webpack-middleware.
It appears that the middle should hold the request since it mention 'wait until bundle finished'. However the request just returns 404. Maybe it caused the above error? And it's blocking me from further try.
from koa-webpack-middleware.
It appears Koa isn't waiting until webpack has finished building the bundle before sending a response, and then the middleware eventually finishes building and tries to send a response afterwards- which by then is too late and causes a server error.
The server has to be restarted and we manually have to wait until we see the bundle finished building. After many hours of development and working on the server code, it gets a bit frustrating. I tried forking this and working it out, but my experience with the internals of NodeJS and Koa request / response is limited and I couldn't fix it unfortunately.
Has there been any progress on this issue?
from koa-webpack-middleware.
closed #14
from koa-webpack-middleware.
Related Issues (19)
- regeneratorRuntime is not defined HOT 20
- How to run middleware with other routes HOT 1
- Missing Examples HOT 1
- Combine Setup for Efficiency HOT 4
- how to set content-type application/octet-stream
- serverSideRender option is not supported HOT 1
- An in-range update of koa is breaking the build 🚨 HOT 3
- ReferenceError: regeneratorRuntime is not defined HOT 3
- Add feature to use fileSystem HOT 1
- 1.0.4 is broken in NPM registry HOT 2
- Error: Cannot find module 'koa-webpack-middleware' HOT 2
- Crash when loading page before bundle ready HOT 1
- stable release? HOT 2
- Should "regenerator-runtime" be put into devDependencies?
- Upgrade webpack-dev-middleware to latest version to support webpack 3 HOT 2
- Middleware for all routes
- Why don't you just remove this module
- How to use hotMiddleware.publish ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from koa-webpack-middleware.