sharepointspfx

SPFX App is not installed and does not uninstalls from webapplication


I have deployed a SPFX app on the on-prem SharePoint 2019 server but it is not reflecting on the web application

Version of SPFX 1.1

The add an app page of the web application also shows the message "Apps are not enabled" on this server.

Also I have noticed that Subscriptions Settings Service Application is not running on the server, is it required for SPFX solutions ?


Solution

  • Yes, to deploy SPFx apps, you must enable:

    Also, an App catalog site (App > Manage App Catalog) had to be created.

    Subscriptions Settings Service Application App Management Service Application

    You can automate the initial provisioning by PowerShell:

    $sssa = New-SPSubscriptionSettingsServiceApplication -ApplicationPool "SharePoint Web Services Default" -Name "Subscriptions Settings Service Application" -DatabaseName "SP_AppSubscription"
    New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $sssa
    
    
    $account = Get-SPManagedAccount "AD\service-account"    
    $appPoolAppSvc = New-SPServiceApplicationPool -Name "AppServiceAppPool" -Account $account
    $appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name "SP_AppServiceApp" -DatabaseName "SP_AppServiceApp"
    New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc
    
    (Get-SPServiceInstance | where-object {$_.TypeName -eq "App Management Service"}).Provision()