Skip to content

[bug] TypeError: Cannot read properties of undefined (reading 'filter') when passing stats object #669

@mjames-c

Description

@mjames-c

Unfortunately, webpack-bundle-analyzer doesn't print an error stack trace so I don't know which property it is expecting that isn't present in the stats file. The top level keys in the stats JSON object are listed below:

cat <omitted>/webpack-stats.json | jq 'keys[]'
"chunks"
"entrypoints"
"errors"
"errorsCount"
"hash"
"namedChunkGroups"
"outputPath"
"publicPath"
"version"
"warnings"
"warningsCount"

cat <omitted>/webpack-stats.json | jq '.chunks[] | select(. != null) | keys[] | limit(1; .)' | sort
"auxiliaryFiles"
"children"
"childrenByOrder"
"entry"
"files"
"hash"
"id"
"idHints"
"initial"
"modules"
"names"
"origins"
"parents"
"recorded"
"rendered"
"runtime"
"siblings"
"size"
"sizes"

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions