Search code examples
amazon-ec2nestjs

Nestjs: `yarn build` hangs forever on EC2 instance


I have cloned my nestjs project on EC2 instance and when I run yarn build or yarn start:dev, it just hangs there and does not make a build.

Please let me know what are the possible reasons for this.

enter image description here


Solution

  • If you are using type free-teer-t2.micro, it consumes almost all CPU credits for a simple "yarn install" or "npm install" and then instance freezes.

    It works well on higher types ( i.e., t2.medium and higher).