FormidableLabs / webpack-dashboard

A CLI dashboard for webpack dev server
MIT License
13.87k stars 363 forks source link

TypeError: Cannot read property 'type' of null #335

Closed zicodeng closed 3 years ago

zicodeng commented 3 years ago

Please provide a description of the bug / issue, and provide the details below:

Not sure if this is related to this plugin or not, but after upgrading webpack-dev-server to the latest version (4.0.0), this error started showing up. However, webpack-dev-server runs fine without this plugin 🤔

TypeError: Cannot read property 'type' of null
    at Socket.<anonymous> (/Users/zicodeng/code/wenwentips/client/node_modules/webpack-dashboard/bin/webpack-dashboard.js:79:21)
    at Socket.emit (events.js:315:20)
    at Socket.emitUntyped (/Users/zicodeng/code/wenwentips/client/node_modules/socket.io/dist/typed-events.js:69:22)
    at /Users/zicodeng/code/wenwentips/client/node_modules/socket.io/dist/socket.js:428:39
    at processTicksAndRejections (internal/process/task_queues.js:75:11)
error Command failed with exit code 1.

====================================================================

If the issue is visual, please provide screenshots here

====================================================================

Steps to reproduce the problem

====================================================================

Please provide a gist of relevant files
  1. package.json (specifically the script you are using to start the dashboard)
"webpack-cli": "^4.8.0",
"webpack-dashboard": "^3.3.3",
"webpack-dev-server": "^4.0.0",
  1. webpack.config.js
  2. index.js (Your express based dev server, if applicable)

====================================================================

More Details
ryan-roemer commented 3 years ago

Hi @zicodeng -- can you open up a minimal repository with install + error reproduction steps? That would greatly accelerate our ability to dig in and figure out what's up. Thanks!

zicodeng commented 3 years ago

@ryan-roemer Thanks for your response! I have created a repo for reproduction. Let me know if you have any questions. Thanks for looking into this :)

zicodeng commented 3 years ago

@ryan-roemer Any update?

ryan-roemer commented 3 years ago

Hi! Thanks for the repo. I’m on leave until next Tuesday, so I’ll likely turn to this next week. Thanks!

ryan-roemer commented 3 years ago

Confirmed. Working on a fix!

ryan-roemer commented 3 years ago

Fixed in webpack-dashboard@3.3.6. Thanks for repo @zicodeng !