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

Unable to import @nrwl/angular:init #6790

Closed
srleecode opened this issue Aug 20, 2021 · 2 comments · Fixed by #6883
Closed

Unable to import @nrwl/angular:init #6790

srleecode opened this issue Aug 20, 2021 · 2 comments · Fixed by #6883
Labels
community This is a good first issue for contributing outdated scope: angular Issues related to Angular support in Nx type: bug

Comments

@srleecode
Copy link
Contributor

Current Behavior

Unable to import the generator @nrwl/angular:init

Expected Behavior

Should be able to import the @nrwl/angular initGenerator in another generator like you can for other generators. For example:
import { reactInitGenerator } from '@nrwl/react';
import { cypressInitGenerator } from '@nrwl/cypress';

Steps to Reproduce

Try to import the init angular generator and it won't work. This angular init generator file was exported in #6721 , but for some reason the angular init generator does not use a named export. The rest of the generators all export a named function. There are two options to fix this:

  • update export * from './src/generators/init/init'; in the generator's index to export {default as angularInitGenerator} from './src/generators/init/init';
  • update the generator from just export default to export function angularInitGenerator and export default angularInitGenerator;

Can you please let me know which solution is better. I can raise a PR for this if you would like.

@FrozenPandaz FrozenPandaz added community This is a good first issue for contributing scope: angular Issues related to Angular support in Nx labels Aug 27, 2021
@FrozenPandaz
Copy link
Collaborator

FrozenPandaz commented Aug 27, 2021

Yes, please raise a PR with the 2nd option: "update the generator from just export default to export function angularInitGenerator and export default angularInitGenerator;"

It should look similar to what the other generators have.

Thank you!

srleecode added a commit to srleecode/nx that referenced this issue Aug 28, 2021
fix (angular): allows importing from @nrwl/angular:init

Closes nrwl#6790
FrozenPandaz pushed a commit that referenced this issue Aug 31, 2021
* fix (angular): allows importing from @nrwl/angular:init

fix (angular): allows importing from @nrwl/angular:init

Closes #6790

* chore(angular): fixed formatting error

chore(angular): fixed formatting error
sumitparakh pushed a commit to sumitparakh/nx that referenced this issue Sep 1, 2021
* fix (angular): allows importing from @nrwl/angular:init

fix (angular): allows importing from @nrwl/angular:init

Closes nrwl#6790

* chore(angular): fixed formatting error

chore(angular): fixed formatting error
ManojBahuguna pushed a commit to ManojBahuguna/nx that referenced this issue Sep 16, 2021
* fix (angular): allows importing from @nrwl/angular:init

fix (angular): allows importing from @nrwl/angular:init

Closes nrwl#6790

* chore(angular): fixed formatting error

chore(angular): fixed formatting error
@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 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community This is a good first issue for contributing outdated scope: angular Issues related to Angular support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants