elastic beanstalk 배포 후 에러

김남경·2023년 5월 22일
0

next

목록 보기
7/7
post-custom-banner

An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.

로그파일을 확인해보았더니 아래와 같은 에러가 나왔다

Error: /var/app/current/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node: invalid ELF header

bcrypt를 작업한 로컬은 맥이고 beanstalk은 리눅스체제이기 때문이라고 한다

Are you creating the Beanstalk package on your Mac? Ultimately you've got an architecture mismatch in a native library. If you compiled that native library on your Mac it won't work on the Linux environment of Elastic Beanstalk.

해결

npm install bcryptjs
npm install
import bcrypt from "bcrypt";를
import bcrypt from "bcryptjs";로 수정

참고

AWS Elastic Beanstalk invalid ELF Handler
Bcrypt Elastic beanstalk nodejs deploy

profile
기본에 충실하며 앞으로 발전하는
post-custom-banner

0개의 댓글