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
Error output: UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot set property 'webpackStats' of undefined
I'm getting this error when using the serverSideRender: true option in webpack-dev-middleware and a following middleware. I think it's caused by webpack-dev-middleware wanting to set res.locals.webpackStats here.
I believe the res object is created here and cannot be changed in between.
The text was updated successfully, but these errors were encountered:
there's some significant madness around that option here. given that that's the only place res.locals appears in the webpack-dev-middleware, we might have to assert that locals exists on our end. that could be a koa 1 vs. koa 2 thing. I'm open to a PR that resolves your use-case.
it's also wholly irresponsible of them not to check that res.locals exists to begin with, prior to assigning it. you may want to open an issue with that project describing as much as well.
Node version: 7.5.0
NPM version: 4.1.2
Koa version: 2.0.0-alpha.7
koa-webpack version: 0.3.0
Error output:
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot set property 'webpackStats' of undefined
I'm getting this error when using the serverSideRender: true option in webpack-dev-middleware and a following middleware. I think it's caused by webpack-dev-middleware wanting to set res.locals.webpackStats here.
I believe the res object is created here and cannot be changed in between.
The text was updated successfully, but these errors were encountered: