Skip to content

Cannot set property 'webpackStats' of undefined #28

Closed
@croissong

Description

@croissong

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions