3

When i upload my web part in app catalog, after install in dev site. I have following error:

enter image description here

How to solve this problem?

3
  • 2
    Is your gulp server is running? Try to make https://localhost:4321/ as trusted url and that will solve your problem. Otherwise you can upload the scripts to document library and use in client side web part. Aug 3, 2017 at 6:24
  • Write it as an answer to approve it
    – Goshky
    Aug 3, 2017 at 6:33
  • posted as answer. Aug 3, 2017 at 7:09

2 Answers 2

5

Is your gulp server is running? Try to make https://localhost:4321/ as trusted url (browser options) and that will solve your problem.

Otherwise you can upload the scripts to document library and use in client side web part.

Also note you can use this for development, as you are using resource from your localhost. But when you move to production you need to host the scripts file somewhere accessible to everyone (a document library or CDN). To achieve this you can navigate to solution config -> write-manifests.json and upadate cdnBasePath property to CDN URL or Document Library URL (till folders in which your scripts are uploaded).

3

The page is trying to load resources from localhost.

read the error

If you have uploaded to SharePoint-Online this is "wrong".

3
  • I dont think so, for development you can refer to scripts localhost. For production you need to upload them to CDN or Library from where it will be accessible to everyone. It is because of the trust certificate issue. You can add the URL to trusted url in order to solve. Aug 3, 2017 at 7:13
  • @ThinkB4Code: But the title was ".. after upload in SPOffice365.." so I assumed this is "online" - also the top of the image suggests "Developer Site" - it does not look like the SP-Workbench..
    – Nils
    Aug 3, 2017 at 7:30
  • 2
    By referring to after upload in SPOffice365, he means .sppkg and not script files, which is clear by seeing the error. Anyways, I guess he got the solution, which is more important as a community. :) Aug 3, 2017 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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