Getting "Warning: An error occurred while requesting the API" when opening Strapi

I’m having the same issue.
npm runs the develop server correctly but I get the same infinite loading screen with that same error message, no errors in the console.

found this and it worked for me: Impossible to show admin page after local install · Issue #12010 · strapi/strapi · GitHub

run

npm run build 

then

npm run develop
System Info
  • Strapi Version: 4.0.4
  • Operating System: Windows 10
  • Database: SQLite
  • Node Version: 16.13.2
  • NPM Version: 8.3.0
  • Yarn Version: 1.22.17
2 Likes