codestates / codestates/Bobpago
[๐จErr Handling] AWS EC2์ NestJS ๋ฐฐํฌํ ๋ ๋ฐ์ํ๋ ์๋ฌ
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
### ์ด๋ค ์๋ฌ์ธ๊ฐ์?
- ec2์ NestJs npm run build๋ฅผ ํตํด distํด๋ ๋ง๋ค๋ ์๊ธฐ๋ ์ค๋ฅ
- ec2์ ํ๋ก์ ํธ ์ฑ์ ํด๋ก ๋ฐ์ ํ์ npm rub build๋ฅผ ํ๋ฉด distํด๋๊ฐ ์์ฑ๋์ผํ๋๋ฐ ์ค๋๋์ ๋ฉ์ถฐ์๋ค๊ฐ heap out of memory ์๋ฌ๊ฐ ๋ฌ๋ค.
### ์๋ฌ ๋ฉ์์ง
```bash
$ FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
```
### ์๋ฌ ํธ๋ค๋ง ๋ฐฉ๋ฒ
- ์ฒ์์ ์ฉ๋์ ๋๋ ค์ค์ ์๋ ๋ฐฉ๋ฒ์ ๋ํด ์ฐพ์๋ณด์์ผ๋, ์ฝ๋ ๋ด๋ถ์ ์ผ๋ก ๋ฌธ์ ๊ฐ ์์๊ฑฐ๊ฐ๋ค๊ณ ์๊ฐํด์ ์ข๋ ๊ตฌ๊ธ๋ง์ ํด๋ดค๋ค.
- ec2 ๊ฐ์ํ๊ฒฝ์์๋ nest ๋ช
๋ น์ด๋ฅผ ์ธ์ํ์ง ๋ชปํ๋ค๋ ์ ๋ณด๋ฅผ ์๊ฒ๋์ด์, dist ํด๋๋ฅผ ๋ก์ปฌ์์ ์์ฑ ํ package.jsonํ์ผ์ ์์ ๋ณต์ฌ๋ฅผ ํด์ฃผ๊ณ ec2์ ํ๋ก์ ํธ ๋๋ ํ ๋ฆฌ ๋ด๋ถ์ ์ง์ ์ฃผ์
์์ผฐ๋ค.
- ๊ทธ ๊ฒฐ๊ณผ ์๋ฒ๊ฐ ์ ์์ ์ผ๋ก ์๋๋ฌ๋ค.
### ์๋ฌ ํธ๋ค๋ง์ ์ํด ์ฐธ๊ณ ํ ๋ ํผ๋ฐ์ค ๋งํฌ
[https://stackoverflow.com/questions/54737166/how-to-generate-a-production-build-of-an-api-done-with-nestjs](https://stackoverflow.com/questions/54737166/how-to-generate-a-production-build-of-an-api-done-with-nestjs)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.