1

I am trying to upload my custom web part to my sharepoint online site. The upload is successful, but when adding the web part to a site it is not the expected content of the web part. It seems to be an older version of the web part. The web part works as expected when accessing it from the workbench after executing gulp serve.

Expected Result:

enter image description here

Actual Result:

enter image description here

Steps I took to upload:

  1. In the correct directory I executed gulp package-solution --ship

Result:

enter image description here

  1. I uploaded my sppkg file to the App site with no errors enter image description here

  2. I added the web part to one of my sites.

Additional information:

• This web part utilizes the Microsoft Graph API and all API requests are granted

• I transferred computers in the middle of development and just copy + pasted the contents minus the node modules.

• There are no error logs in the google chrome console

3
  • Did you do a bundle as well? "gulp bundle --ship" For good measure, throw in a "gulp clean" first! Mar 17, 2020 at 19:20
  • 1
    Yes, I did do a "gulp bundle --ship". "gulp clean" managed to fix whatever issue it was having uploading. Thanks for your help!
    – JustinW
    Mar 17, 2020 at 19:28
  • Excellent, no problem :) Mar 17, 2020 at 19:31

1 Answer 1

0

Recapping the comment discussion above with the OP, running gulp clean before gulp bundle --ship and gulp package-solution --ship solved this problem.

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.