SPFx Client-web part deployed to App Catalog with Error

%3CLINGO-SUB%20id%3D%22lingo-sub-52646%22%20slang%3D%22en-US%22%3ESPFx%20Client-web%20part%20deployed%20to%20App%20Catalog%20with%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-52646%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%26nbsp%3Bto%20do%20a%20test%20deployment%20of%26nbsp%3Bsample%20hellow-world%20spfx%20web-part%2C%20it%20works%20on%20local%2Fspo%26nbsp%3Bwork.%3C%2FP%3E%0A%3CP%3ESo%20I%20have%20packaged%26nbsp%3Band%20deployed%20to%20App%20catalog%20and%20I%20ran%20gulp%20server%20--nobrowser.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHowever%20when%20I%20add%20the%20app%20to%20either%20classic%20or%20modern%20page%20getting%3C%2FP%3E%0A%3CH2%20class%3D%22ms-webpart-titleText%22%20style%3D%22text-align%3A%20justify%3B%22%20id%3D%22toc-hId--1329586277%22%20id%3D%22toc-hId-1708543581%22%3E%3CSPAN%3Espfxsample%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CDIV%20class%3D%22ms-WPBody%20noindex%20ms-wpContentDivSpace%20%22%20id%3D%22WebPartWPQ5%22%3E%0A%3CDIV%20data-sp-cs-webpartid%3D%22g_717a1ff7_d142_4427_bf82_3f9e95ec1f12%22%3E%0A%3CDIV%20class%3D%22ms-Overlay%20Placeholder-overlay%22%20data-reactroot%3D%22%22%3E%0A%3CDIV%20class%3D%22Placeholder-spinnerContainer%22%3E%0A%3CDIV%20class%3D%22ms-Spinner%22%3E%0A%3CDIV%20class%3D%22ms-Spinner-circle%20ms-Spinner--large%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20class%3D%22ms-Spinner-label%22%3ELoading%20spfxsample...%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CDIV%20data-automation-id%3D%22webPartError%22%20data-sp-id%3D%22cswp-error%22%3E%0A%3CDIV%20class%3D%22errorBox_31f14b89%22%3E%3CSPAN%20class%3D%22errorBoxText_31f14b89%22%3E%5BSPWebPartErrorCode.ScriptLoadError%5D%3A%3A%20Unable%20to%20load%20web%20part%20WebPart.SpfxsampleWebPart.g_717a1ff7_d142_4427_bf82_3f9e95ec1f12%2CError%3A%20***Failed%20to%20load%20component%20%22975235e6-352b-4a1a-a243-5cef666f5cd0%22%20(SpfxsampleWebPart).%20Original%20error%3A%20***Failed%20to%20load%20path%20dependency%20%22spfxsampleStrings%22%20from%20component%20%22975235e6-352b-4a1a-a243-5cef666f5cd0%22%20(SpfxsampleWebPart).%20script%20resources%20due%20to%3A%20%7B1%7D.%20CALLSTACK%3A%3A%20Error%20at%20t%20(%3CA%20href%3D%22https%3A%2F%2Fspoprod-a.akamaihd.net%2Ffiles%2Fsp-client-prod_2017-02-17.024%2Fsp-loader_en-us_7e0d5042c05ad28d8921cd4db4b615f8.js%3A57%3A21572%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fspoprod-a.akamaihd.net%2Ffiles%2Fsp-client-prod_2017-02-17.024%2Fsp-loader_en-us_7e0d5042c05ad28d8921cd4db4b615f8.js%3A57%3A21572%3C%2FA%3E)%20at%20t%20(%3CA%20href%3D%22https%3A%2F%2Fspoprod-a.akamaihd.net%2Ffiles%2Fsp-client-prod_2017-02-17.024%2Fsp-webpart-base_en-us_f1e7fe0db482755680368ab38b10cb75.js%3A47%3A22738%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fspoprod-a.akamaihd.net%2Ffiles%2Fsp-client-prod_2017-02-17.024%2Fsp-webpart-base_en-us_f1e7fe0db482755680368ab38b10cb75.js%3A47%3A22738%3C%2FA%3E)%20at%20t.create%20(%3CA%20href%3D%22https%3A%2F%2Fspoprod-a.akamaihd.net%2Ffiles%2Fsp-client-prod_2017-02-17.024%2Fsp-webpart-base_en-us_f1e7fe0db482755680368ab38b10cb75.js%3A47%3A23180%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fspoprod-a.akamaihd.net%2Ffiles%2Fsp-client-prod_2017-02-17.024%2Fsp-webpart-base_en-us_f1e7fe0db482755680368ab38b10cb75.js%3A47%3A23180%3C%2FA%3E)%20at%20Anonymous%20function%20(%3CA%20href%3D%22https%3A%2F%2Fspoprod-a.akamaihd.net%2Ffiles%2Fsp-client-prod_2017-02-17.024%2Fsp-webpart-base_en-us_f1e7fe0db482755680368ab38b10cb75.js%3A48%3A6288%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fspoprod-a.akamaihd.net%2Ffiles%2Fsp-client-prod_2017-02-17.024%2Fsp-webpart-base_en-us_f1e7fe0db482755680368ab38b10cb75.js%3A48%3A6288%3C%2FA%3E)%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ebased%20on%20-%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdev.office.com%2Fsharepoint%2Fdocs%2Fspfx%2Fweb-parts%2Fget-started%2Fserve-your-web-part-in-a-sharepoint-page%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdev.office.com%2Fsharepoint%2Fdocs%2Fspfx%2Fweb-parts%2Fget-started%2Fserve-your-web-part-in-a-sharepoint-page%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-52696%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20Client-web%20part%20deployed%20to%20App%20Catalog%20with%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-52696%22%20slang%3D%22en-US%22%3E%3CP%3EForgot%20to%20mention%20-%20if%20add%20the%20CDN%26nbsp%3B%20with%20%22cdnBasePath%22%20%3CBR%20%2F%3Eand%20Run%20command%20%22Gulp%20bundle%20--ship%22%20%3CBR%20%2F%3Eupload%20the%20temp%2Fdeploy%20packages%20to%20above%20mentioned%20%22cdn%20document%20library%22%3C%2FP%3E%0A%3CP%3Egulp%20package-solution%20--ship%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20was%20working.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Microsoft

I am trying to do a test deployment of sample hellow-world spfx web-part, it works on local/spo work.

So I have packaged and deployed to App catalog and I ran gulp server --nobrowser.

 

However when I add the app to either classic or modern page getting

spfxsample

 
Loading spfxsample...
[SPWebPartErrorCode.ScriptLoadError]:: Unable to load web part WebPart.SpfxsampleWebPart.g_717a1ff7_d142_4427_bf82_3f9e95ec1f12,Error: ***Failed to load component "975235e6-352b-4a1a-a243-5cef666f5cd0" (SpfxsampleWebPart). Original error: ***Failed to load path dependency "spfxsampleStrings" from component "975235e6-352b-4a1a-a243-5cef666f5cd0" (SpfxsampleWebPart). script resources due to: {1}. CALLSTACK:: Error at t (https://spoprod-a.akamaihd.net/files/sp-client-prod_2017-02-17.024/sp-loader_en-us_7e0d5042c05ad28d8...) at t (https://spoprod-a.akamaihd.net/files/sp-client-prod_2017-02-17.024/sp-webpart-base_en-us_f1e7fe0db48...) at t.create (https://spoprod-a.akamaihd.net/files/sp-client-prod_2017-02-17.024/sp-webpart-base_en-us_f1e7fe0db48...) at Anonymous function (https://spoprod-a.akamaihd.net/files/sp-client-prod_2017-02-17.024/sp-webpart-base_en-us_f1e7fe0db48...)

 

based on -

https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/serve-your-web-part-in-a-sharepoin...

 

1 Reply
Highlighted

Forgot to mention - if add the CDN  with "cdnBasePath"
and Run command "Gulp bundle --ship"
upload the temp/deploy packages to above mentioned "cdn document library"

gulp package-solution --ship

 

This was working.