2

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

enter image description here Installed Versions:

Versions:
After "npm list -g --depth 0"

enter image description here

2

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/cli@6.2.9

or

npm install -g @pnp/generator-spfx @angular/cli@7.3.9

Reference - Angular elements in PnP SPFx generator

| improve this answer | |
  • I have already installed it but somehow not working – Chandani Prajapati Sep 2 '19 at 11:01
  • Did you install it globally ? Also try doing that in admin mode. – Gautam Sheth Sep 2 '19 at 11:04
  • Yes i also added globally as an admin but not working – Chandani Prajapati Sep 2 '19 at 11:07
  • I have updated question and added screenshot for versions – Chandani Prajapati Sep 2 '19 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/generator-spfx@1.8.1 and try – Gautam Sheth Sep 2 '19 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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