Coder Social home page Coder Social logo

Comments (5)

leecade avatar leecade commented on May 31, 2024 5

yeah I notice that too, will do more test and fix it soon

from koa-webpack-middleware.

sanketmeghani avatar sanketmeghani commented on May 31, 2024 1

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.

ironsweet avatar ironsweet commented on May 31, 2024

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.

lostpebble avatar lostpebble commented on May 31, 2024

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.

leecade avatar leecade commented on May 31, 2024

closed #14

from koa-webpack-middleware.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.