How we can enable Angular elements in SPFx webpart using @pnp/spfx generator?

enter image description here Installed Versions:

After "npm list -g --depth 0"

enter image description here

1 Answer 1


You also need to install the angular CLI. If that is not installed, this option is disabled.

To install the CLI, you can do that as below:

npm install -g @angular/cli

Once installed, this option will be enabled.

Update - based on comments.

Looks like there is some sort of regression in the 1.9.0 version.

To use the angular elements with the latest version, you need to use an older version of Angular CLI as below:

npm install -g @pnp/generator-spfx @angular/[email protected]


npm install -g @pnp/generator-spfx @angular/[email protected]

Reference - Angular elements in PnP SPFx generator

  • I have already installed it but somehow not working Commented Sep 2, 2019 at 11:01
  • Did you install it globally ? Also try doing that in admin mode. Commented Sep 2, 2019 at 11:04
  • Yes i also added globally as an admin but not working Commented Sep 2, 2019 at 11:07
  • I have updated question and added screenshot for versions Commented Sep 2, 2019 at 11:08
  • 1
    never mind, looks like a regression in the latest version. Can you use the older version of the generator using npm install -g @pnp/[email protected] and try Commented Sep 2, 2019 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.