SOLVED

SharePoint SPX development webpart

%3CLINGO-SUB%20id%3D%22lingo-sub-360896%22%20slang%3D%22en-US%22%3ESharePoint%20SPX%20development%20webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-360896%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20m%20new%20to%20SPX%20development%20and%20I%20have%20created%20my%20first%20web%20part%20using%20Vs%20Code%20and%20run%20successfully%2C%20but%20when%20I%20do%20changes%20on%20the%20code%20and%20then%20run%20the%20code%20it%20won't%20reflect%20the%20changes%20on%20Sharepoint%20even%20I%20removed%20and%20re%20add%20the%20web%20part.%26nbsp%3B%3C%2FP%3E%3CP%3EEvery%20time%20I%20create%20a%20new%20project%20and%20do%20the%20changes%20it%20will%20reflect%20without%20issue%2C%20I%20was%20thinking%20it%20will%20be%20a%20cache%20issue%20on%20browser%20and%20I%20remove%20the%20cache%2C%20but%20still%20not%20reflecting%20the%20changes.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ecan%20someone%20please%20help%20me.%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-365216%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20SPX%20development%20webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-365216%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Vishwanatha%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20reply%2C%20seems%20to%20be%20it%20is%20working%20now.%20But%20I%20haven't%20done%20any%20specific%20changes%2C%20so%20I%20cannot%20post%20the%20answer%2F%20findings.%3C%2FP%3E%3CP%3EOnly%20thing%20that%20I%20can%20think%20of%20is%20save%20every%20changes%20before%20run%20the%20gulp%20serve.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20all.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-364621%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20SPX%20development%20webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-364621%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Nipuna%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20happens%20when%20you%20browse%20https%3A%2F%2Flocalhost%3A4321%2C%20does%20it%20get%20served%20or%20do%20you%20see%20any%20issues%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1)%20Check%20if%20you%20have%20added%20dev%20cert%20using%20gulp%20dev%20cert%3C%2FP%3E%3CP%3E2)%20If%20the%20above%20site%20gives%20protocol%20error%20you%20need%20add%20a%20environment%20variable%20as%20mentioned%20here%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-fx-webparts%2Fissues%2F357%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-fx-webparts%2Fissues%2F357%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-364560%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20SPX%20development%20webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-364560%22%20slang%3D%22en-US%22%3E%3CP%3EHI%20Ujwaln%2C%3C%2FP%3E%3CP%3EThanks%20for%20your%20reply%2C%20could%20you%20you%20please%20explain%20to%20me%20why%20I%20need%20to%20worry%20about%20the%20tenancy%20setting%20as%20I%20m%20trying%20to%20running%20on%20the%20local%20host.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-362563%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20SPX%20development%20webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-362563%22%20slang%3D%22en-US%22%3E%3CP%3EI%20think%20public%20CDN%20is%20enabled%20on%20your%20tenant%2C%20could%20be%20the%20reason%20why%20your%20are%20facing%20this%20caching%20stuff.%3C%2FP%3E%3CP%3EPlease%20check%20the%20reference%20of%20your%20assets%20is%20it%20coming%20form%20a%20public%20CDN%20or%20not%2C%20if%20it%20is%20a%20Public%20CDN%20and%20it%20take%20sometime%20to%20update%20the%20assets%20over%20there%20post%20your%20changes.%3C%2FP%3E%3CP%3ERefer%20below%20for%20more%20idea%20on%20public%20CDN%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fget-started%2Fhosting-webpart-from-office-365-cdn%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fget-started%2Fhosting-webpart-from-office-365-cdn%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-362475%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20SPX%20development%20webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-362475%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Federico%2C%3C%2FP%3E%3CP%3ENo%20I%20haven't%20installed%20it%2C%20I%20m%20using%20local%20host%20Work%20bench%20with%20gulp%20serve.%20If%20i%20create%20a%20new%20project%20and%20run%20gulp%20serve%20then%20the%20new%20project%20will%20reflect%2C%20but%20if%20you%20do%20a%20small%20modification%20and%20re%20run%20the%20gulp%20serve%20and%20re%20add%20the%20web%20part%20I%20cannot%20see%20the%20changes.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-361067%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20SPX%20development%20webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-361067%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F117612%22%20target%3D%22_blank%22%3E%40nipuna%20weerasinghe%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELike%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F138334%22%20target%3D%22_blank%22%3E%40Federico%20Porceddu%3C%2FA%3E%26nbsp%3Bmentioned%2C%20if%20this%20happens%20when%20deploying%20a%20new%20version%20of%20the%20app%2C%20make%20sure%20that%20you%20update%20the%20version%20on%20config%20%26gt%3B%20package-solution.json%3C%2FP%3E%3CP%3EKeeping%20the%20same%20app%20version%20number%20on%20different%20code%20versions%20can%20lead%20to%20this%20issue.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-360961%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20SPX%20development%20webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-360961%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F117612%22%20target%3D%22_blank%22%3E%40nipuna%20weerasinghe%3C%2FA%3E%20%2C%3C%2FP%3E%3CP%3Elet%20me%20understand%20better%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3EDid%20you%20install%20on%20app%20catalog%3F%3C%2FP%3E%3CP%3EIf%20yes%2C%20did%20you%20deploy%20%2F%20update%20a%20new%20versione%3F%3C%2FP%3E%3CP%3EMy%20hint%20is%20to%20execute%20%3CEM%3Enpm%20clean%3C%2FEM%3E%20before%20%3CEM%3Egulp%20bundle%20--ship%3C%2FEM%3E%20and%20%3CEM%3Egulp%20package-solution%20--ship%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3CP%3EFederico%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

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. 

7 Replies

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

Hi @nipW 

 

Like @Federico Porceddu 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.

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. 

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

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/hosting-webpart-from-offi...

 

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. 

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

best response confirmed by nipW (Contributor)
Solution

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.