Same issue.
After I upgrade strapi from 4.11.7 to version 4.12.7 and this publish error occur.
Here is the fix:
remove build and .cache folders, rebuild the project npm run build and then the error gone.
Same issue.
After I upgrade strapi from 4.11.7 to version 4.12.7 and this publish error occur.
Here is the fix:
remove build and .cache folders, rebuild the project npm run build and then the error gone.