Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating angular project with no initial app throws sb init error #12058

Closed
AlokTakshak opened this issue Aug 16, 2020 · 8 comments
Closed

Creating angular project with no initial app throws sb init error #12058

AlokTakshak opened this issue Aug 16, 2020 · 8 comments

Comments

@AlokTakshak
Copy link

Describe the bug
Creating angular project with no initial app throws sb init error
• Detecting project type. ✓
• Adding Storybook support to your "Angular" app
TypeError: Cannot read property 'architect' of undefined

To Reproduce
Steps to reproduce the behavior:

  1. ng new ng-ui --create-application=false
  2. cd ng-ui
  3. ng g lib button -p ui
  4. npx -p @storybook/cli sb init
  5. See error

Expected behavior
should add storybook to my workspace

Screenshots
If applicable, add screenshots to help explain your problem.
image

@github-actions
Copy link
Contributor

github-actions bot commented Aug 16, 2020

Automention: Hey @Marklb @MaximSagan @kroeder @tooppaaa @yannbf, you've been tagged! Can you give a hand here?

@Rogier-blip
Copy link

@AlokTakshak I had the same problem and for me, the fix was to in the angular.json set the "defaultProject" field to the correct name.

Hope this helps!

@ThibaudAV
Copy link
Contributor

Seems to be related to #6978

Indeed sotrybook works only if it "finds" an application in angular.json. it doesn't work with a library

@jongbonga
Copy link

jongbonga commented Feb 23, 2022

I'm having this exact error in ng13

@AlokTakshak I had the same problem and for me, the fix was to in the angular.json set the "defaultProject" field to the correct name.

What do you mean by "correct name"?

Indeed sotrybook works only if it "finds" an application in angular.json. it doesn't work with a library

I have "projectType": "application"

@ndelangen
Copy link
Member

Is this still an existing issue in 7.0 beta?

@Marklb
Copy link
Member

Marklb commented Jan 17, 2023

The issue doesn't provide their angular.json, so I can't say for sure, but I think this will be solved by #20559.

@danishaali9
Copy link

@AlokTakshak this issue seems to be fixed as i tried to reproduce it but it was already fixed you can move it to fix section
image

@yannbf
Copy link
Member

yannbf commented Apr 19, 2023

I'll be closing this issue as it seems to be solved in Storybook 7, but feel free to reopen it in case you are still experiencing it in Storybook 7!

@yannbf yannbf closed this as completed Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants