Forum Discussion
SharePoint SPX development webpart
Hi,
I m new to SPX development and I have created my first web part using Vs Code and run successfully, but when I do changes on the code and then run the code it won't reflect the changes on Sharepoint even I removed and re add the web part.
Every time I create a new project and do the changes it will reflect without issue, I was thinking it will be a cache issue on browser and I remove the cache, but still not reflecting the changes.
can someone please help me.
Thanks.
Hi Vishwanatha,
Thanks for your reply, seems to be it is working now. But I haven't done any specific changes, so I cannot post the answer/ findings.
Only thing that I can think of is save every changes before run the gulp serve.
Thanks all.
Hi nipW ,
let me understand better :)
Did you install on app catalog?
If yes, did you deploy / update a new versione?
My hint is to execute npm clean before gulp bundle --ship and gulp package-solution --ship
Cheers
Federico
- nipWBrass Contributor
Hi Federico,
No I haven't installed it, I m using local host Work bench with gulp serve. If i create a new project and run gulp serve then the new project will reflect, but if you do a small modification and re run the gulp serve and re add the web part I cannot see the changes.
Thanks.
- Deleted
Hi nipW
Like FedericoPorceddu82 mentioned, if this happens when deploying a new version of the app, make sure that you update the version on config > package-solution.json
Keeping the same app version number on different code versions can lead to this issue.
- UjwalNCopper Contributor
I think public CDN is enabled on your tenant, could be the reason why your are facing this caching stuff.
Please check the reference of your assets is it coming form a public CDN or not, if it is a Public CDN and it take sometime to update the assets over there post your changes.
Refer below for more idea on public CDN
- nipWBrass Contributor
HI Ujwaln,
Thanks for your reply, could you you please explain to me why I need to worry about the tenancy setting as I m trying to running on the local host.
Thanks.
- Vishwanatha NayakBrass Contributor
Hi Nipuna,
What happens when you browse https://localhost:4321, does it get served or do you see any issues:
1) Check if you have added dev cert using gulp dev cert
2) If the above site gives protocol error you need add a environment variable as mentioned here https://github.com/SharePoint/sp-dev-fx-webparts/issues/357