Deployment Error in SP2019 On-Premises App Catalog

John Marañon 0 Reputation points
2024-06-11T07:21:25.7933333+00:00

We're utilizing SPFx version 1.4.1 for SharePoint 2019 On-Premises. In our dedicated virtual machine (VM), development is carried out on our internal domain. Deploying to /sites/AppCatalog presents no issues. However, when attempting to upload the package to the production site with a different web application name, we encounter an error. It indicates that the solution will retrieve content from:

HTTPS://SPCLIENTSIDEASSETLIBRARY/;

https://{vmlocaldomain}

This points to our VM's domain. How should we configure our SPFx solution to address this?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,141 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,780 questions
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 33,176 Reputation points Microsoft Vendor
    2024-06-24T07:11:30.08+00:00

    Hi @John Marañon,

    Does the spfx webpart work in workbench.aspx? This usually caused by your code build failed. When you run gulp serve, there would be error in node console. You could check the error and fix it.

    For CDN, If Microsoft 365 CDN is enabled, it's used automatically with default settings. If Microsoft 365 CDN isn't enabled, assets are served from the app catalog site collection. This means that if you leave the includeClientSideAssets setting true, your solution assets are automatically hosted in the tenant. Please refer to this article: https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/hosting-webpart-from-office-365-cdn

    To verify that you have CDN configured properly, please run the command: Get-PnPTenantCdnOrigin -CdnType "Public" . Make sure you have a Public CDN origin configured for ClientSideAssets.

    54585-image.png