Skip to content
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

Crashed in hot reload, version 3.3.0 #1776

Closed
1 of 2 tasks
Ronweyh opened this issue Apr 9, 2019 · 8 comments · Fixed by #1780
Closed
1 of 2 tasks

Crashed in hot reload, version 3.3.0 #1776

Ronweyh opened this issue Apr 9, 2019 · 8 comments · Fixed by #1780

Comments

@Ronweyh
Copy link

Ronweyh commented Apr 9, 2019

  • Operating System: MacOS
  • Node Version: 10.15.2
  • NPM Version: 6.4.1
  • webpack Version: 4.28.2
  • webpack-dev-server Version: 3.3.0
  • This is a bug
  • This is a modification request

Code

Error

dev-server.js:9 Uncaught TypeError: Cannot read property 'indexOf' of undefined
    at upToDate (webpack:///(:8888/webpack)/hot/dev-server.js?:9:19)
    at EventEmitter.eval (webpack:///(:8888/webpack)/hot/dev-server.js?:53:8)
    at EventEmitter.emit (events.js:151)
    at reloadApp (webpack:///(:8888/webpack)-dev-server/client?:269:16)
    at Object.ok (webpack:///(:8888/webpack)-dev-server/client?:163:5)
    at SockJS.onmessage (webpack:///(:8888/webpack)-dev-server/client/socket.js?:40:25)
    at SockJS.EventTarget.dispatchEvent (sockjs.js:170)
    at eval (sockjs.js:887)
    at Array.forEach (<anonymous>)
    at SockJS._transportMessage (sockjs.js:885)
    at WebSocketTransport.EventEmitter.emit (sockjs.js:86)
    at WebSocketTransport.ws.onmessage (sockjs.js:2961)

dev-server.js:9

var upToDate = function upToDate() {
    return lastHash.indexOf(__webpack_require__.h()) >= 0;
};

Expected Behavior

HMR work correctly

Actual Behavior

Crashed in hot reload mode

For Bugs; How can we reproduce the behavior?

For Features; What is the motivation and/or use-case for the feature?

@hiroppy
Copy link
Member

hiroppy commented Apr 9, 2019

Please submit a reproducible repo.

@alexander-akait
Copy link
Member

I think problem in stats (now we respect their from config, but looks we forget something defined)

@alexander-akait
Copy link
Member

@bryfroze Anyway please create minimum reproducible test repo, thanks

@bazineta
Copy link

bazineta commented Apr 9, 2019

This seems as if it might be a regression, for which there was a previous fix, #1366. In our case at least, we typically have hash: false set in our stats options, and see this issue. Setting the hash flag to true resolves the issue.

@alexander-akait
Copy link
Member

Yep, it is regression we already works on this

@livemixlove
Copy link

When will this fix be put into a release?

@alexander-akait
Copy link
Member

yes

@sjelfull
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants