-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Uncaught ReferenceError: __webpack_dev_server_client__ is not defined #2006
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It is expected, how you setup webpack-dev-server? This line respect for variable https://github.com/webpack/webpack-dev-server/blob/master/lib/utils/updateCompiler.js#L54, looks you have invalid configuration |
Thank you for the reply @evilebottnawi Can you please take a look at the config we are using for setting up the devServer?
where the devServer object is as follows:
and publicPath is I would also like to mention that the app loads just fine without using the |
@bureson config looks good, very strange, because we automatically mount provide plugin, maybe you can create minimum reproducible test repo? |
@evilebottnawi it's a little tricky to extract the whole project into a reproducible repo. However when I open either |
@bureson I have the same problem.
|
@evilebottnawi I don't think you understood me. Both of the files I'm mentioning ( |
@bureson maybe you can't understand how it is works. As i written above when you run |
@evilebottnawi I think the And my guess is It seems app.get('/webpack-dev-server.js', (req, res) => {
res.setHeader('Content-Type', 'application/javascript');
createReadStream(
join(__dirname, '..', '..', 'client', 'index.bundle.js')
).pipe(res);
}); And compare
+ [@3.7.1] ...?[0-9A-PRZcf-nqry=><]/g}},function(e,r,t){"use strict";var o=__webpack_dev_server_client__,n=0,a=null,s=function(e,r){(a=new o(e)).onOpen...
- [@3.5.1] ...?[0-9A-PRZcf-nqry=><]/g}},function(e,t,r){"use strict";var n=r(14),o=0,i=null,s=function(e,t){(i=new n(e)).onopen=... Maybe something changed around the package script |
Having Having it in
|
Then it's a lucky catch. This error occurs in a monkey-patched dev setup with inlined |
@dr-js yes, you are right, it will be breaking change for next major release |
Has invalid fix what potentially can break other application and now it is super critical |
Code
Expected Behavior
Webpack should compile a working bundle.
Actual Behavior
When trying the app in the webpack-dev-server mode (having the webpack-dev-server as part of the URL enabling hot reloading), browser reports a following error:
I believe it is coming from the following line introduced in version 3.7.0:
webpack-dev-server/client-src/default/socket.js
Line 7 in 3d9288a
Where
__webpack_dev_server_client__
doesn't seem to be defined.For Bugs; How can we reproduce the behavior?
For Features; What is the motivation and/or use-case for the feature?
The text was updated successfully, but these errors were encountered: