we are getting this error when we try to access any page in AEM cloud local publish instance, no error in error.log. Even after login with admin also same error. Any idea why below error might occur in publish instance?The requested URL /content/san/test.html resulted in an error in Apache Sling Cor...
one more thing you can try, replace node.exe in frontend folder with exact version node.exe that you download from online. Sometimes the one which gets downloaded from code base might not work as expected. Then delete node_modules inside and outside and execute a maven build
I too got same error, I was able to resolve by deleting node_modules folder and running the build again, looks like the folder that I got from GIT not compatible with my machine. Useful to run this npm command too "npm cache clean --force"