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

New Storybook Angular project fails: Could not find a default project in your Angular workspace. #13553

Closed
bradfrost opened this issue Jan 4, 2021 · 2 comments

Comments

@bradfrost
Copy link

Describe the bug
I receive the following error when creating a new Angular Storybook project:

 Error: Could not find a default project in your Angular workspace.
Set a defaultProject in your angular.json and re-run the installation.

To Reproduce
Steps to reproduce the behavior:

  1. Run npx sb init and choose ANGULAR from options, or run npx -p @storybook/cli sb init --type angular
  2. After the message Adding Storybook support to your "Angular" app, see the following error:
 Error: Could not find a default project in your Angular workspace.
Set a defaultProject in your angular.json and re-run the installation.

Expected behavior
The Angular project to be successfully installed

Screenshots
Screen Shot 2021-01-04 at 2 10 32 PM

System
System:
OS: macOS 11.1
CPU: (4) x64 Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz
Binaries:
Node: 14.5.0 - ~/.nvm/versions/node/v14.5.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.5 - ~/.nvm/versions/node/v14.5.0/bin/npm
Browsers:
Chrome: 87.0.4280.88
Firefox: 84.0.1
Safari: 14.0.2

@ThibaudAV
Copy link
Contributor

ThibaudAV commented Jan 6, 2021

I'm not sure, but did you execute npx sb init command in an existing angular project ?
https://storybook.js.org/docs/react/get-started/install

Use the Storybook CLI to install it in a single command. Run this inside your existing project’s root directory:

@bradfrost
Copy link
Author

Ah, thanks @ThibaudAV. I was expecting an empty Angular shell, but it makes sense that isn't Storybook's job.

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

3 participants