Skip to content

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

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"

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions