'Why GraphQL and Strapi isn't working on AWS ECS?

I have a Strapi App (v4) running as a Docker image on AWS Fargate, everything worked perfectly untill I decided to install GraphQL and pushed the updated image to the ECR. Once the task starts running I get the following error:

TypeError: ApplicationError is not a constructor
   at /strapi-api/node_modules/@strapi/plugin-graphql/server/services/builders/dynamic-zones.js:17:15 ... 

the weired thing is that when I run the docker-image locally I get no errors at all and GraphQL is working properly.

hope someone could help me with this error, thanks.



Solution 1:[1]

It turns out I've had a problem with my components folder that is connected to the AWS EFS, I created the project from scratch and now it works like a charm. So if you're having this kind of problem, try creating a new strapi app.

For reference: https://github.com/strapi/strapi/issues/12547Tg

:)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Daniel Avigdor