Version of package is not getting updated. On re-installing new package after removing older one below issue is observed in SharePoint
A different version of this App is already installed with the same version number. You need to delete the app from the site and the site recycle bin to install this version.
Thanks @bipulraman - Just to confirm, you create a package, deploy it to the app catalog and activate it on your site, then remove the old one from the app catalog and deploy a new one to the app catalog, and you get the error?
Or does the error appear on the actual site where you are using the webpart, where you uninstall it, update the package in the app catalog, then re-install it on the site where you are using it?
I created package, deployed to app catalog, activated it on site. Then removed from site. Re created package after some modification. Re-uploaded in app catalog and error coming on activating.
OK, you can do two things to get around this (it's a known bug from a while ago, and you appear to have not have the fix on your tenant).
1 - bump the version of the package and redeploy. That value is stored in the package-solution.json file in the config folder
or
2 - Remove the package from the recycle bin AND the 2nd stage recycle bin
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues