webpack-dev-middleware icon indicating copy to clipboard operation
webpack-dev-middleware copied to clipboard

Issue when making concurrent requests

Open smussell opened this issue 11 years ago • 4 comments

There seems to be an issue when making multiple concurrent requests to webpack-dev-middleware simultaneously. I am using the following config:

{
        lazy:true, 
        publicPath:'/build/',
        filename: "commons.js",
        noInfo: false
}

I have webpack middleware included as part of my dev server which also includes tinyLr for automatic reloading. I am not using the full webpack dev server because I also have my dev server configured to mock my server-side. This all works fine if I have one browser open, but if I have two browsers open to my site at the same time, the server crashes as soon as both browsers try to reload at once. I get the below error message:

/Users/sam/Dropbox/Development/Projects/Apple/reviz/node_modules/webpack/node_modules/tapable/lib/Tapable.js:71
        plugins[this._currentPluginApply].apply(this, args);
                                          ^
TypeError: Cannot call method 'apply' of undefined
    at Tapable.next (/Users/sam/Dropbox/Development/Projects/Apple/reviz/node_modules/webpack/node_modules/tapable/lib/Tapable.js:71:37)
    at done (/Users/sam/Dropbox/Development/Projects/Apple/reviz/node_modules/webpack/node_modules/async/lib/async.js:135:19)
    at /Users/sam/Dropbox/Development/Projects/Apple/reviz/node_modules/webpack/node_modules/async/lib/async.js:32:16
    at /Users/sam/Dropbox/Development/Projects/Apple/reviz/node_modules/webpack/lib/CachePlugin.js:33:6
    at Storage.finished (/Users/sam/Dropbox/Development/Projects/Apple/reviz/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
    at Object.oncomplete (evalmachine.<anonymous>:107:15)

smussell avatar Jan 26 '15 01:01 smussell

Does it only occur with lazy: true?

sokra avatar Jan 26 '15 16:01 sokra

Yes, seems to only occur with lazy=true, lazy=false works except because of the compile time my browser will refresh before the compile finishes so I don't see the updates.

smussell avatar Jan 26 '15 18:01 smussell

+1

nottoseethesun avatar Jan 30 '15 00:01 nottoseethesun

Tried to reproduce this error myself, but it seems to have been fixed. This ticket is very old, so closing this. Feel free to provide more information if you still have this issue.

SpaceK33z avatar Sep 17 '16 18:09 SpaceK33z