SPFx extension missing from yeoman.

%3CLINGO-SUB%20id%3D%22lingo-sub-254187%22%20slang%3D%22en-US%22%3ESPFx%20extension%20missing%20from%20yeoman.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-254187%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20build%20a%20SPFx%20extension%20for%20SharePoint%20online.%20When%20using%20Yeoman%20generator%2C%20I%20am%20not%20getting%20option%20to%20create%20a%20project%20for%20extension.%20Only%20option%20available%20in%20webpart.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENode%20version%20%3A-%20v8.12.0%3C%2FP%3E%3CP%3Enpm%20version%20%3A-%26nbsp%3B6.4.1%3C%2FP%3E%3CP%3ESharePoint%20generator%20version%3A-%201.6.0%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESee%20attached%20screen%20shot%20for%20options.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyone%20has%20faced%20similar%20issue%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20990px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F50120iEF753A3963C15E62%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22yoemn-error.png%22%20title%3D%22yoemn-error.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-256528%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20extension%20missing%20from%20yeoman.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-256528%22%20slang%3D%22en-US%22%3E%3CP%3EI%20tried%20to%20do%20some%20more%20research%20and%20found%20that%20.yo-rc.json%20was%20having%20below%20configurations.%20Since%20the%20environment%20is%20onprem%20thats%20why%20extensions%20were%20not%20showing.%20The%20Yoeman%20was%20referring%20this%20file%20while%20creating%20the%20new%20solution.%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22%40microsoft%2Fgenerator-sharepoint%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22isCreatingSolution%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3Etrue%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSTRONG%3E%22environment%22%3A%20%22onprem%22%2C%3C%2FSTRONG%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22version%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%221.6.0%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22libraryName%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22app-extension%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22libraryId%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22c10653e7-a74c-4001-a1d9-ab6e3a778a60%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22packageManager%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22npm%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22componentType%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22webpart%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-256480%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20extension%20missing%20from%20yeoman.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-256480%22%20slang%3D%22en-US%22%3E%3CP%3EI%20cleaned%20up%20the%20parent%20folder%20which%20has%20app%20the%20dependencies%20added%20to%20it%20and%20started%20from%20scratch.%20It%20worked%20fine.%20I%20am%20not%20able%20to%20see%20all%20the%20options.%20Looks%20like%20it%20was%20referencing%20something%20from%20parent%20folder%20and%20skipping%20the%20option%20to%20select%20SharePoint%20online%20or%20SharePoint%202016.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-255294%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20extension%20missing%20from%20yeoman.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-255294%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20other%20thing%20which%20I%20noticed%20is%20that%2C%20target%20environment%20option%20is%20missing%20when%20creating%20the%20project%20using%20Yoeman.%20I%20tried%20uninstalling%20Yoeman%20and%20SharePoint%20generator%20and%20installed%20back.%20Still%20same%20issue.%20Thoughts%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-255246%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20extension%20missing%20from%20yeoman.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-255246%22%20slang%3D%22en-US%22%3E%3CP%3EAfter%20executing%20the%20above%20command%2C%20I%20get%20below%20result%3C%2FP%3E%3CP%3E%60--%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F41501%22%20target%3D%22_blank%22%3E%40microsoft%3C%2FA%3E%2Fgenerator-sharepoint%401.6.0%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-254834%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20extension%20missing%20from%20yeoman.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-254834%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20you%20verify%20which%20version%20of%20the%20generator%20you're%20using%20by%20executing%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Enpm%20ls%20-g%20--depth%3D0%20%40microsoft%2Fgenerator-sharepoint%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-744714%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20extension%20missing%20from%20yeoman.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-744714%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F16525%22%20target%3D%22_blank%22%3E%40Rishi%20Gupta%3C%2FA%3E%26nbsp%3B%20hello%20Rishi%2C%20I'm%20facing%20the%20same%20issue.%20I%20have%20NodeJs%20v10.16.0%20and%20sharepoint-generator%20v1.8.2.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20been%20trying%20to%20find%20this%20configuration%20(the%20one%20you%20posted)%20to%20check%20if%20I%20have%20the%20same%2C%20but%20I%20can't%20find%20it%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22%40microsoft%2Fgenerator-sharepoint%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22isCreatingSolution%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3Etrue%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSTRONG%3E%22environment%22%3A%20%22onprem%22%2C%3C%2FSTRONG%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22version%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%221.6.0%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22libraryName%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22app-extension%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22libraryId%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22c10653e7-a74c-4001-a1d9-ab6e3a778a60%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22packageManager%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22npm%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22componentType%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22webpart%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EI've%20uninstalled%20the%20generator%2C%20and%20re-installed%2C%20but%20still%20the%20same%2C%20can%20you%20point%20me%20where%20is%20exactly%20this%20file%3F%20Thanks%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-744730%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20extension%20missing%20from%20yeoman.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-744730%22%20slang%3D%22en-US%22%3EUPDATE%3A%20Just%20in%20case%20someone%20is%20using%20this%20tool.%20I've%20realized%20that%20if%20I%20use%20the%20Powershell%20Console%2C%20I%20have%20the%20%22Extension%22%20option%20and%20I%20can%20create%20it.%20However%2C%20if%20I%20use%20Cmder.exe%20that%20opcion%20is%20not%20available.%20I%20will%20not%20waste%20my%20time%20trying%20to%20find%20a%20solution%20to%20this%2C%20I%20prefeer%20to%20use%20PS%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2450041%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20extension%20missing%20from%20yeoman.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2450041%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F16525%22%20target%3D%22_blank%22%3E%40Rishi%20Gupta%3C%2FA%3E%26nbsp%3BI%20found%20in%20available%20only%20if%20i%20choose%202019%20onward...%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hello,

 

I am trying to build a SPFx extension for SharePoint online. When using Yeoman generator, I am not getting option to create a project for extension. Only option available in webpart.

 

Node version :- v8.12.0

npm version :- 6.4.1

SharePoint generator version:- 1.6.0

 

See attached screen shot for options.

 

Anyone has faced similar issue?

 

yoemn-error.png

8 Replies

Can you verify which version of the generator you're using by executing:

 

 

npm ls -g --depth=0 @microsoft/generator-sharepoint

 

 

After executing the above command, I get below result

`-- @microsoft/generator-sharepoint@1.6.0

The other thing which I noticed is that, target environment option is missing when creating the project using Yoeman. I tried uninstalling Yoeman and SharePoint generator and installed back. Still same issue. Thoughts?

I cleaned up the parent folder which has app the dependencies added to it and started from scratch. It worked fine. I am not able to see all the options. Looks like it was referencing something from parent folder and skipping the option to select SharePoint online or SharePoint 2016.

 

Thanks for your help.

 

I tried to do some more research and found that .yo-rc.json was having below configurations. Since the environment is onprem thats why extensions were not showing. The Yoeman was referring this file while creating the new solution. 

{
"@microsoft/generator-sharepoint": {
"isCreatingSolution": true,
"environment": "onprem",
"version": "1.6.0",
"libraryName": "app-extension",
"libraryId": "c10653e7-a74c-4001-a1d9-ab6e3a778a60",
"packageManager": "npm",
"componentType": "webpart"
}
}

@Rishi Gupta  hello Rishi, I'm facing the same issue. I have NodeJs v10.16.0 and sharepoint-generator v1.8.2.

 

I've been trying to find this configuration (the one you posted) to check if I have the same, but I can't find it:

 

{
"@microsoft/generator-sharepoint": {
"isCreatingSolution": true,
"environment": "onprem",
"version": "1.6.0",
"libraryName": "app-extension",
"libraryId": "c10653e7-a74c-4001-a1d9-ab6e3a778a60",
"packageManager": "npm",
"componentType": "webpart"
}
}
 
I've uninstalled the generator, and re-installed, but still the same, can you point me where is exactly this file? Thanks
 
UPDATE: Just in case someone is using this tool. I've realized that if I use the Powershell Console, I have the "Extension" option and I can create it. However, if I use Cmder.exe that opcion is not available. I will not waste my time trying to find a solution to this, I prefeer to use PS

@Rishi Gupta I found in available only if i choose 2019 onward...