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

Angular stories creation: Cannot read property 'getChildren' of undefined - Declare Variable #4314

Closed
allout58 opened this issue Dec 16, 2020 · 1 comment · Fixed by #4318
Assignees
Labels
outdated scope: storybook Issues related to Storybook support in Nx type: bug

Comments

@allout58
Copy link
Contributor

Current Behavior

Generating a new @nrwl/angular:storybook-configuration fails with the message: Cannot read property 'getChildren' of undefined

Expected Behavior

A storybook configuration to be created or a meaningful error message of how I can resolve.

Steps to Reproduce

Create a "barrel export" Angular module with a variable with all the components used for both the declarations and exports arguments of @NgModule directive like the following:

const COMPONENTS = [
  FirstComponent,
  SecondComponent,
  AdditionalDirective
];

@NgModule({
  imports: [CommonModule],
  declarations: COMPONENTS,
  exports: COMPONENTS
})
export class FancyLibraryModule {}

Failure Logs

Cannot read property 'getChildren' of undefined

Environment

nx : Not Found
@nrwl/angular : 10.4.7
@nrwl/cli : 10.4.7
@nrwl/cypress : 10.4.7
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : 10.4.7
@nrwl/jest : 10.4.7
@nrwl/linter : 10.4.7
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : 10.4.7
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 10.4.7
@nrwl/web : Not Found
@nrwl/workspace : 10.4.7
typescript : 4.0.5

Related Issues

#2521 - This resolved issue is about import * as syntax. This issue, while having the same generic error message

allout58 added a commit to allout58/nx that referenced this issue Dec 16, 2020
@vsavkin vsavkin added the scope: storybook Issues related to Storybook support in Nx label Dec 16, 2020
allout58 added a commit to allout58/nx that referenced this issue Dec 17, 2020
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: storybook Issues related to Storybook support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants