1

I am new to SharePoint framework. I am executing yo @microsoft\sharepoint. Providing all the inputs.

For the question Which type of component to be created? it is showing only Webpart. It is not showing Extension and library.

I have updated node and yo. I am not sure which one I am missing to get those two options made available.

enter image description here

yo --version 3.1.0

node -v v13.1.0

3 Answers 3

4

You have to select "SharePoint Online only (latest)" or "SharePoint 2019 onwards, including SharePoint Online" for the question Which baseline packages do you want to target for your component(s)? to get option for "Extension".


If the answer is helpful, please upvote and mark as accepted.

4
  • I tried selecting SharePoint Online only (latest) as well same behavior. Commented Nov 15, 2019 at 12:31
  • Are you using SharePoint generator updated version? Commented Nov 15, 2019 at 16:51
  • I have updated with "npm install @microsoft/generator-sharepoint@latest -g" comment. still same problem. Commented Nov 19, 2019 at 9:47
  • Try to use node version 10.x Commented Nov 19, 2019 at 14:17
2

Reason:

SharePoint 2016 does not support SPFx extensions.

This is because SharePoint 2016 on-premises doesn't support Modern UI.

SharePoint Extensions are supported only in SharePoint 2019 and SharePoint Online as of now.

Solution:

In order to create a SharePoint Extension choose any one of the below options for the question, Which baseline packages do you want to target for your component(s)?:

  1. SharePoint Online only (latest)
  2. SharePoint 2019 onwards, including SharePoint Online

Update:

I would recommend you to use the Node.js v10.x as below is given in official documentation:

The current supported LTS version of NodeJS for the SharePoint Framework is both Node.js v8.x and Node.js v10.x. Notice that 9.x or 11.x versions are currently not supported with SharePoint Framework development.

4
  • I tried selecting SharePoint Online only (latest) as well same behavior. Commented Nov 15, 2019 at 12:31
  • Which version of node and yeoman generator you are using? Commented Nov 15, 2019 at 13:24
  • node version : v13.1.0 YO version: 3.1.0 Commented Nov 19, 2019 at 9:38
  • I would recommend you to use the Node.js v10.x Commented Nov 19, 2019 at 9:43
0

I had the same issue. If you change "isDomainIsolated": false, to true it should fix it. It can be found in the .yo-rc.json file

3
  • it will be very beneficial if you mention where we can find this property "isDomainIsolated". Like some config file or where?
    – Asad Refai
    Commented Jun 28, 2021 at 11:36
  • You can update your answer with information about the "isDomainIsolated" property.
    – Asad Refai
    Commented Jun 28, 2021 at 11:43
  • Ah yep sorry it's in the .yo-rc.json file in the solution. You'll find this at the bottom of the file structure
    – Al Roome
    Commented Jun 29, 2021 at 12:15

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.