Skip to content

Conversation

@ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Jul 10, 2025

Closes #31975

What I did

This should resolve the ERR_UNSUPPORTED_DIR_IMPORT error.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This pull request has been released as version 0.0.0-pr-32012-sha-80090a19. Try it out in a new sandbox by running npx [email protected] sandbox or in an existing project with npx [email protected] upgrade.

More information
Published version 0.0.0-pr-32012-sha-80090a19
Triggered by @ghengeveld
Repository storybookjs/storybook
Branch angular-builders-dir-import
Commit 80090a19
Datetime Thu Jul 10 20:32:05 UTC 2025 (1752179525)
Workflow run 16205390773

To request a new release of this pull request, mention the @storybookjs/core team.

core team members can create a new canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=32012

Greptile Summary

Updates Angular builders configuration to resolve the ERR_UNSUPPORTED_DIR_IMPORT error in Angular 19 by explicitly specifying index.js file paths instead of directory imports.

  • Modified code/frameworks/angular/builders.json to use explicit file paths for build-storybook and start-storybook implementations
  • Addresses import restrictions in ES modules that prevent direct directory imports
  • Minimal, focused change that fixes issue [Bug]: ERR_UNSUPPORTED_DIR_IMPORT Angular 19 #31975 with Angular 19 compatibility

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile

@nx-cloud
Copy link

nx-cloud bot commented Jul 10, 2025

View your CI Pipeline Execution ↗ for commit 80090a1

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 15s View ↗

☁️ Nx Cloud last updated this comment at 2025-07-10 20:55:47 UTC

@AngularIsAwfull
Copy link

This fixes my broken project which was failing with ERR_UNSUPPORTED_DIR_IMPORT

@ghengeveld ghengeveld merged commit 22bfe7a into next Jul 11, 2025
59 of 60 checks passed
@ghengeveld ghengeveld deleted the angular-builders-dir-import branch July 11, 2025 09:37
@ghengeveld ghengeveld added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Jul 11, 2025
@ghengeveld ghengeveld removed the patch:yes Bugfix & documentation PR that need to be picked to main branch label Jul 15, 2025
@ghengeveld ghengeveld self-assigned this Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ERR_UNSUPPORTED_DIR_IMPORT Angular 19

4 participants