0

Why does my deployed SPFx webpart suddenly has an error? It works when I'm in the workbench, but the deployed one has this error. I followed this https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/deploy-web-part-to-cdn to create a simple webpart.

I think my farm has been upgraded to GA since the links in my network are all 2017-02-17.019

https://spoprod-a.akamaihd.net/files/sp-client-prod_2017-02-17.019/sp-page-context_4818826de35d390ac9d5643f34244b8b.js

[SPWebPartErrorCode.ScriptLoadError]:: Unable to load web part WebPart.HelloWorldWebPart.484f04af-2db3-48ff-ae5e-d5616908374e,Error: ***Failed to load component "3061ce58-4f5c-48e7-8d6f-4a8398731b48" (HelloWorldWebPart). Original error: ***Failed to load path dependency "helloWorldStrings" from component "3061ce58-4f5c-48e7-8d6f-4a8398731b48" (HelloWorldWebPart). script resources due to: {1}. CALLSTACK:: Error at t [as constructor] (https:// spoprod-a.akamaihd.net/files/sp-client-prod_2017-02-17.019/sp-loader_en-us_c7a5ee2faf8f15c3c9ab1ecc5e7db21d.js:57:21740) at new t (https:// spoprod-a.akamaihd.net/files/sp-client-prod_2017-02-17.019/sp-webpart-base_en-us_f7b0b90820799ba53083111c72956e29.js:47:22746) at Function.t.create (https:// spoprod-a.akamaihd.net/files/sp-client-prod_2017-02-17.019/sp-webpart-base_en-us_f7b0b90820799ba53083111c72956e29.js:47:23187) at https:// spoprod-a.akamaihd.net/files/sp-client-prod_2017-02-17.019/sp-webpart-base_en-us_f7b0b90820799ba53083111c72956e29.js:48:6311

0

Make sure your gulp serve is running. We need to improve our error messages (working on it). This basically says "I can't load helloWorldStrings.js".

The easiest thing to do would be pop open your developer tools, and check for a 404 trying to load helloworldstrings.js. See what URL it is pointing to. If it is localhost:... it means your manifest is still pointing to your local copy, and you need gulp serve running in order to load them.

  • Hi, even if its already deployed in sharepoint? thank you! will try it – Page F.P.T Mar 8 '17 at 8:03
  • Hi, your answer worked thanks. now i just need to find a way for it to not load files locally. Thank you! – Page F.P.T Mar 8 '17 at 10:12
  • Check out this post - sharepoint.stackexchange.com/questions/208210/… There is another comment I made on it on how to use the CDN backed library feature that is rolling out. Works quite nicely (although not smoothly integrated at the moment). – PatMill_MSFT Mar 8 '17 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.