webpack-dashboard: `Could not load module/asset sizes.` after upgrade from 0.4.0 -> 1.0.0-3

Please provide a description of the bug / issue, and provide the details below: Getting an error after upgrading webpack-dashboard

Could not load module/asset sizes.                                                                                                                    
Error: Cannot read property 'length' of undefined                                                                                                      Could not analyze bundle problems.                                                                                                                   undefined

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

If the issue is visual, please provide screenshots here

dashboard

Steps to reproduce the problem

Just starting up dashboard causes the issue - code compiles fine, but modules, assets, and problems windows do not render any info

Please provide a gist of relevant files
  1. My start.sh command:
  ./node_modules/.bin/webpack-dashboard -- \
  ./node_modules/.bin/webpack-dev-server \
  --config webpack/webpack.config.js \
  --port 3000 \
  --host [redacted] \
  --history-api-fallback \
  --content-base ./src \
  --open \
  --inline \
  --hot \
  --debug
  1. webpack.config.js
devServer: {
  clientLogLevel: 'none',
  disableHostCheck: true,
  noInfo: true,
  quiet: true,
  stats: 'errors-only',
},
plugins: [
  //...
  new DashboardPlugin(),
]

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

More Details
  • What operating system are you on? OSX
  • What terminal application are you using? iTerm2
  • What version of webpack-dashboard are you using? 1.0.0-3
  • What is the output of running echo $TERM? xterm-256color
  • webpack v3.5.5
  • webpack-dev-server v2.7.1

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 13
  • Comments: 44 (16 by maintainers)

Commits related to this issue

Most upvoted comments

@jpduckwo Thanks. That error is resolved after upgrading to 1.0.0-7. But getting new error. Any leads to solve this?

Worker error Error: No code sections found
    at Bundle.validate (/u/user/application/node_modules/inspectpack/lib/models/bundle.js:54:11)
    at createBundle (/u/user/application/node_modules/inspectpack/lib/models/bundle.js:262:12)
    at Immediate.setImmediate (/u/user/application/node_modules/inspectpack/lib/models/bundle.js:313:7)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
Worker error Error: No code sections found
    at Bundle.validate (/u/user/application/node_modules/inspectpack/lib/models/bundle.js:54:11)
    at createBundle (/u/user/application/node_modules/inspectpack/lib/models/bundle.js:262:12)
    at Immediate.setImmediate (/u/user/application/node_modules/inspectpack/lib/models/bundle.js:313:7)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
Worker error Error: No code sections found
    at Bundle.validate (/u/user/application/node_modules/inspectpack/lib/models/bundle.js:54:11)
    at createBundle (/u/user/application/node_modules/inspectpack/lib/models/bundle.js:262:12)
    at Immediate.setImmediate (/u/user/application/node_modules/inspectpack/lib/models/bundle.js:313:7)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)

@ryansullyinspectpack@1.3.2 is the correct, most up to date version, and within webpack-dashboard’s semver range in package.json.

@tptee @kenwheeler – We could bump package.json from "inspectpack": "^1.3.0", to "inspectpack": "^1.3.2", and we should update yarn.lock + package-lock.json files…

Side note – we should get a procedure for maybe PRs to ensure both yarn.lock + package-lock.json are regenerated. Currently they have different versions of inspectpack and the package-lock.json file doesn’t even meet semver requirements.

I’m having an issue after upgrading too. I’ve tried adding pathinfo: true, my inspectpack is 1.3.2… any ideas?

Dashboard Log window shows this at the start the repeats with ‘could not analyze bundle problems.’

Compiled successfully!                                                                                        
                                                                                                              
   205 modules                                                                                                
/Users/xxxx/node_modules/babylon/lib/index.js:781                                     
    var code = this.input.charCodeAt(this.state.pos);                                                         
                          ^                                                                                   
                                                                                                              
TypeError: this.input.charCodeAt is not a function                                                            
    at Parser.fullCharCodeAtPos (/Users/xxxx/node_modules/babylon/lib/index.js:781:27)
    at Parser.nextToken (/Users/xxxx/node_modules/babylon/lib/index.js:766:34)
    at Parser.parse (/Users/xxxx/node_modules/babylon/lib/index.js:1672:10)                              
    at Object.parse (/Users/xxxx/node_modules/babylon/lib/index.js:7305:37)                              
    at module.exports (/Users/xxxx/node_modules/inspectpack/lib/parser/index.js:103:23)                  
    at new Bundle (/Users/xxxx/node_modules/inspectpack/lib/models/bundle.js:23:16)                      
    at Immediate.validateErr (/Users/xxxx/node_modules/inspectpack/lib/models/bundle.js:266:22)          
    at runCallback (timers.js:666:20)                                                                                            
    at tryOnImmediate (timers.js:639:5)                                                                                          
    at processImmediate [as _immediateCallback] (timers.js:611:5)                                                                
                                                                                                                                 
Could not load module/asset sizes.

@jpduckwo / everyone else – I’m closing this issue since we’ve solved what originally opened it. Please open new issues with ideally a full reproduction steps (if your project is not open source, please put up a sample repository project with minimum code needed to hit the issue).

Thanks!

@derkjn – It’s unrelated. inspectpack requires a specified root package.json to run the versions action, which you can see here: https://github.com/FormidableLabs/inspectpack/blob/46081b3d294429a3ac9e521621dac078bd995a57/lib/actions/versions.js#L305-L310

I’d open a new issue with your exact setup and file structure including where your node_modules lives.

Not sure if it’s related but I’m getting stuck at the following error:

Could not analyze bundle problems.                                                                          ││ idle (1s)                         │
│ Error: Unable to find project root package.json                                                             │└───────────────────────────────────┘
│     at Versions.getData 
  1. not minified or stripped - I only use the dashboard for developer builds. I also have cssmodules and sourcemaps disabled
  2. yes - pathinfo: true is set
  3. I do not use webpack.optimize.ModuleConcatenationPlugin - had some problem with it when upgrading webpack a while back and so it is currently commented out