Skip to content

NXT-19371: resolve webpack version mismatch causing parser.getLocation build failure - #114

Merged
daniel-stoian-lgp merged 2 commits into
developfrom
feature/NXT-19371
Aug 25, 2026
Merged

daniel-stoian-lgp merged 2 commits into
developfrom
feature/NXT-19371

Conversation

@hong6316

@hong6316 hong6316 commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Checklist

  • I have read and understand the contribution guide
  • A CHANGELOG entry is included
  • I have run automated testing and it is passed
  • Documentation was added or is not needed
  • This is an API breaking change

Issue Resolved / Feature Added

The build fails during the Storybook webpack build with:

Module parse failed: parser.getLocation is not a function
TypeError: parser.getLocation is not a function
  at constDependency (JavascriptParserHelpers.js:129:20)
  at DefinePlugin.js:951:10

Two conflicting webpack versions are installed simultaneously:

  • webpack@5.107.2 — pinned in devDependencies (the "host" webpack used by Storybook)
  • webpack@5.109.2 — installed nested under @enact/dev-utils/node_modules/ (resolved from peer dependencies)

When @enact/dev-utils's ILibPlugin does require('webpack'), it resolves to the nested 5.109.2 copy. The DefinePlugin from 5.109.2 registers parser hooks that call parser.getLocation() — a method introduced in webpack 5.108+. However, the actual parser instance comes from the host's webpack 5.107.2, which does not have this method, causing the TypeError.

Resolution

  1. Update webpack from exact 5.107.2 to ^5.109.2 to align with the version npm resolves for nested dependencies

Additional Considerations

Links

NXT-19371

Comments

Enact-DCO-1.0-Signed-off-by: Taeyoung Hong (taeyoung.hong@lge.com)

@daniel-stoian-lgp
daniel-stoian-lgp merged commit bd9a6cc into develop Aug 25, 2026
2 checks passed
@daniel-stoian-lgp
daniel-stoian-lgp deleted the feature/NXT-19371 branch August 25, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants