The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
Hello G Saikiran Reddy,
Based on my research, the latest version displayed in the App Catalog only confirms that the updated package has been uploaded and deployed. It does not necessarily mean that the browser or SharePoint site is loading the latest JavaScript bundle.
Some possible causes include:
- The previous JavaScript bundle is still cached by the browser, SharePoint, or the CDN.
- The newly uploaded package still contains an older bundle because the build folders were not cleaned before packaging.
- The JavaScript assets were not packaged correctly. If automatic asset hosting is being used, please confirm that
includeClientSideAssetsis set totrue. - An older
CustomAction, component ID, or extension registration may still exist on the affected site. - If the bundle is hosted on an external CDN, uploading a new
.sppkgfile will not automatically update the JavaScript files at the external location. The latest bundle must also be uploaded to the correct CDN path.
For reference:
You can also refer to the AI-generated answer in this thread for additional troubleshooting suggestions. For example, you may first test whether the behavior is related to caching:
- Open the affected SharePoint site in an InPrivate or Incognito window.
- Perform a hard refresh by pressing
Ctrl + F5. - Open Developer Tools > Network.
- Enable Disable cache, and then reload the page.
- Check the URL and file name of the JavaScript bundle being loaded.
If the old code is still executed in an InPrivate or Incognito window, the issue is likely not limited to the local browser cache.
You may then completely clean and rebuild the solution. Depending on the SPFx and toolchain version, consider removing old build artifacts such as:
-
dist -
lib -
release -
sharepoint/solution -
temp
After cleaning the project, perform a new production build and package. For newer Heft-based projects, the commands are:
heft build --production
heft package-solution --production
Please also verify that the following setting is present in config/package-solution.json:
JSON
"includeClientSideAssets": true
If Microsoft 365 CDN or automatic asset hosting is being used, this setting is important because it controls whether the JavaScript assets are included in the .sppkg package.
To confirm that the correct package is being deployed, you may also:
- Increase the version number in
package-solution.json. - Rebuild and repackage the solution.
- Verify the timestamp of the generated
.sppkgfile. - Remove the older package from the App Catalog Recycle Bin if necessary.
- Upload the newly generated package and deploy or enable it again.
Since this is a menu customization, the solution may be using an Application Customizer. Please also check whether the affected site contains multiple extension registrations or CustomAction entries with the same component ID. If an older registration still exists, SharePoint may continue loading the previous extension or passing older properties to it.
I hope this information helps.