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

Installation fails in an existing Angular 9 project #12232

Closed
vadal opened this issue Aug 25, 2020 · 8 comments
Closed

Installation fails in an existing Angular 9 project #12232

vadal opened this issue Aug 25, 2020 · 8 comments

Comments

@vadal
Copy link

vadal commented Aug 25, 2020

Describe the bug
When I run npx sb init or npx -p @storybook/cli sb init in an existing angular 9 project, I get the following error:
Cannot read property 'build' of undefined.

To Reproduce
Steps to reproduce the behavior:

  1. Open terminal inside an angular9 project
  2. Run npx sb init or npx -p @storybook/cli sb init command

Expected behavior
Installation succeeds

Screenshots
error

System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-3635QM CPU @ 2.40GHz
Binaries:
Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
Yarn: 1.0.2 - /usr/local/bin/yarn
npm: 6.13.4 - ~/.nvm/versions/node/v12.16.1/bin/npm
Browsers:
Chrome: 84.0.4147.135
Firefox: 79.0
Safari: 13.1.2
npmGlobalPackages:
@storybook/cli: 6.0.16

Additional context

  • Angular version: 9.1.6

Can you please help? I can't find any workaround.

@vadal
Copy link
Author

vadal commented Aug 31, 2020

Can please someone help?
I haven't got an answer neither here nor in support chat. It seems that support team ignores my issue.

@Marklb
Copy link
Member

Marklb commented Aug 31, 2020

Can you provide a repo that reproduces the issue? That error looks like your default project in angular.json does not have the build property at projects.default-project-name.architect.build.

Since no configuration details are provided, my best guess is that you are maybe using Nx? If that is the case, you may find steps to help here: https://nx.dev/angular/plugins/storybook/overview

@JamboBuenna
Copy link

Also getting the same issue. I followed the install on an Ionic Project and straight Angular project both on ng9. I did this initially using the standard tutorial & then also the tutorial here. I got the invalid hook calls errors other are getting, it seemed to be in this case the app wanted to instanciate React but no react instance was installed.

image

There were also a number more errors.

image

We're not using an nx repro.

@vadal
Copy link
Author

vadal commented Sep 17, 2020

@Marklb thank you for the answer. I don't use an nx repo either.
I was able to make it work by adding the architect property in angular.json

@stale
Copy link

stale bot commented Oct 12, 2020

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Oct 12, 2020
@stale stale bot removed the inactive label Oct 16, 2020
@stale
Copy link

stale bot commented Dec 25, 2020

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@shilman
Copy link
Member

shilman commented Jan 13, 2021

Good golly!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.2.0-alpha.13 containing PR #13558 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

@shilman
Copy link
Member

shilman commented Jan 22, 2021

Olé!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.1.15 containing PR #13558 that references this issue. Upgrade today to the @latest NPM tag to try it out!

npx sb upgrade

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

4 participants