I have deployed a library and webpart in sharepoint and later I updated the library and deployed it again then I have noticed the code in the previous version library is getting executed.

I have also noticed the library component was not included in the script resources property of webpart manifest which was generated after gulp bundle --ship

1 Answer 1

  1. Change the version to higher one in both config/package-solution.json and package.json.
  2. Do gulp build --ship, then gulp bundle --ship then do gulp package-solution --ship.
  3. After adding the new version to appcatalog, go to the local site, Site Contents, find the webpart, click on details, then update.
  4. Ctrl+F5 on the page where the webpart was deployed.
  • I have tried but still facing the same issue. I think the issue is the library component code is also bundle with the webpart code Commented Mar 2, 2022 at 12:18
  • Ah, I get it now. Did you try deleting the library?
    – jo1storm
    Commented Mar 2, 2022 at 12:20
  • no, I have deployed it without deleting the existing package Commented Mar 2, 2022 at 12:25
  • I didn't mean package, but library itself. It can't run it over. Only create it.
    – jo1storm
    Commented Mar 2, 2022 at 13:46
  • I removed the library in the app catalog and deployed it again, but still facing the same issue Commented Mar 3, 2022 at 1:50

Your Answer

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

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