Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

2.1K
Vistas
Strapi: Warning an error occurred while requesting the API

I've been struggling for hours trying to install Strapi on my Ubuntu server.

Ubuntu: 20.04
nodejs: v14.19.0
npm: 6.14.16
strapi: 4

npx create-strapi-app@latest my-project --quickinstall

All the installation process goes seamlessly but when I go to http://mydomain:1337/admin in order to create a first user I get this warning:

an error occurred while requesting the API.

I know this problem has been encountered several times but none of the suggested solutions have helped me so far. I also found this error in the Chrome console but I'm not not sure it's related to the my problem:

main.815f1087.js:2 Refused to connect to 'http://localhost:1337/admin/project-type' because it violates the following Content Security Policy directive: "connect-src 'self' https:".

Any idea ?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Got the same problem, a simple restart of the server did it for me.

over 4 years ago · Santiago Trujillo Denunciar

0

You need to build the app. Read this github issue

Run: npm run build or yarn build or strapi build depending on what you are using

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda