Add SharePoint Framework App on root and subsites

%3CLINGO-SUB%20id%3D%22lingo-sub-66785%22%20slang%3D%22en-US%22%3EAdd%20SharePoint%20Framework%20App%20on%20root%20and%20subsites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-66785%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20folks%2C%3C%2FP%3E%3CP%3EAm%20I%20missing%20something%20or%20it%20is%20not%20possible%20yet%20to%20add%20a%20SPFx%20app%20to%20the%20root%20site%20and%20subsite%20at%20the%20same%20time%20and%20vice%20versa%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20deployed%20my%20app%20on%20the%20root%20site%20collection%20and%20created%20a%20subsite.%20When%20I%20navigate%20to%20the%20site%20contents%20to%20add%20my%20app%20the%20following%20error%20is%20showing%20up%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22A%20different%20version%20of%20this%20App%20is%20already%20installed%20with%20the%20same%20version%20number.%26nbsp%3B%20You%20need%20to%20delete%20the%20app%20from%20the%20site%20and%20the%20site%20recycle%20bin%20to%20install%20this%20version.%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20same%20error%20occurs%20when%20I%20first%20add%20the%20app%20on%20a%20subsite%20and%20then%20try%20to%20do%20add%20it%20to%20the%20actual%20root%20site.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20a%20kind%20of%20strange%20behavior%20I%20don't%20really%20understand%20%3A%5C%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-66785%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-67559%22%20slang%3D%22en-US%22%3ERe%3A%20Add%20SharePoint%20Framework%20App%20on%20root%20and%20subsites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-67559%22%20slang%3D%22en-US%22%3EAh%20OK%20thanks%20for%20that%20hint.%20I%20will%20give%20it%20a%20try.%20Currently%20when%20going%20on%20Integration%20testing%20I%20don't%20update%20the%20version%20number.%20So%20I%20just%20deploy%20the%20updated%20bundle%20and%20manifest%20package.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-67252%22%20slang%3D%22en-US%22%3ERe%3A%20Add%20SharePoint%20Framework%20App%20on%20root%20and%20subsites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-67252%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20not%20sure%20what%20causes%20that%20either%2C%20but%20a%20workaround%20is%20to%20update%20the%20version%20in%20the%20package-solution.json%20and%20repackage%2Fdeploy.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20ran%20into%20a%20similar%20issue%20as%20you%2C%20but%20I%20was%26nbsp%3Bprovisioning%20the%20subsite%20based%20on%20another%20site%20with%20the%20app%20already%20deployed%2C%20so%20I'm%20sure%20I%20screwed%20things%20up%20there.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hi folks,

Am I missing something or it is not possible yet to add a SPFx app to the root site and subsite at the same time and vice versa?

 

I deployed my app on the root site collection and created a subsite. When I navigate to the site contents to add my app the following error is showing up:

 

"A different version of this App is already installed with the same version number.  You need to delete the app from the site and the site recycle bin to install this version."

 

The same error occurs when I first add the app on a subsite and then try to do add it to the actual root site.

 

This is a kind of strange behavior I don't really understand :\

2 Replies
Highlighted

I'm not sure what causes that either, but a workaround is to update the version in the package-solution.json and repackage/deploy.

 

I ran into a similar issue as you, but I was provisioning the subsite based on another site with the app already deployed, so I'm sure I screwed things up there.

Highlighted
Ah OK thanks for that hint. I will give it a try. Currently when going on Integration testing I don't update the version number. So I just deploy the updated bundle and manifest package.