Skip to content

CLI: Improve error handling when dealing with angular.json files#22663

Merged
valentinpalkovic merged 1 commit into
nextfrom
chore/angular-json-issues
May 22, 2023
Merged

CLI: Improve error handling when dealing with angular.json files#22663
valentinpalkovic merged 1 commit into
nextfrom
chore/angular-json-issues

Conversation

@yannbf
Copy link
Copy Markdown
Member

@yannbf yannbf commented May 22, 2023

Closes #22350

What I did

The Storybook CLI now throws different errors and requests the user to file an issue to provide us more information. Regarding #22350 so far we found no way to reproduce the issue, so we rely on the community to bring that up to us.

How to test

  1. Get an angular sandbox with no Storybook
  2. Delete all projects on the angular.json file, or make the key contain an empty object, the following error should be thrown:
Error: Storybook was not able to find any projects in your angular.json file. Are you sure this is an Angular CLI project?

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

@yannbf yannbf added bug cli patch:yes Bugfix & documentation PR that need to be picked to main branch labels May 22, 2023
@yannbf yannbf requested a review from valentinpalkovic May 22, 2023 06:14
@valentinpalkovic valentinpalkovic merged commit fa24eaf into next May 22, 2023
@valentinpalkovic valentinpalkovic deleted the chore/angular-json-issues branch May 22, 2023 07:30
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label May 22, 2023
shilman pushed a commit that referenced this pull request May 22, 2023
CLI: Improve error handling when dealing with angular.json files
@ndelangen ndelangen removed the patch:yes Bugfix & documentation PR that need to be picked to main branch label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug cli patch:done Patch/release PRs already cherry-picked to main/release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

storybook init: Cannot destructure property 'root' of 'angularJSON.getProjectSettingsByName(...)' as it is undefined

4 participants