You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug(버그 내용)
서버 배포 관련 pm2 typescript 설정문제
$ cannot find module @component
....
이처럼 절대경로 (tsconfig.json의 alias path)를 정상적으로 읽지 못하는 상태가 지속됨
To Reproduce(버그 재현 방법)
$ npx pm2 start server/index.ts
해당 명령어를 shell에 입력하면 pm2 log 를 통해 에러 확인 가능
Screenshots(참고할 만한 자료를 첨부, 스크린샷, 코드, 에러 메시지)
에러화면 스크린샷, 예상되는 문제코드 첨부, 에러 메시지등을 첨부해 주세요
Additional context(수정할 방법을 제안할 수 있다면 작성해 주세요)
pm2에서 ts-node를 통해 해당 프로젝트 실행을 하면 가능합니다. ( 현재 처리해둔 방식 )
이 방법을 사용하는 경우 pm2 모듈을 node_modules에 추가하여 진행해야 정상적으로 ts-node를 실행 할 수 있습니다. 실행 스크립트 npx pm2 start ts-node -- --type-check tsconfig-paths/register server/index.ts
해당 스크립트를 package.json에 적용해야 합니다.
ts를 전부 build하여 배포합니다.
The text was updated successfully, but these errors were encountered:
Describe the bug(버그 내용)
서버 배포 관련 pm2 typescript 설정문제
이처럼 절대경로 (tsconfig.json의 alias path)를 정상적으로 읽지 못하는 상태가 지속됨
To Reproduce(버그 재현 방법)
해당 명령어를 shell에 입력하면
pm2 log
를 통해 에러 확인 가능Screenshots(참고할 만한 자료를 첨부, 스크린샷, 코드, 에러 메시지)
에러화면 스크린샷, 예상되는 문제코드 첨부, 에러 메시지등을 첨부해 주세요
Additional context(수정할 방법을 제안할 수 있다면 작성해 주세요)
현재 처리해둔 방식
)이 방법을 사용하는 경우 pm2 모듈을 node_modules에 추가하여 진행해야 정상적으로 ts-node를 실행 할 수 있습니다.
실행 스크립트
npx pm2 start ts-node -- --type-check tsconfig-paths/register server/index.ts
The text was updated successfully, but these errors were encountered: