Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 실서버 배포 관련 이슈 #123

Open
Reone1 opened this issue Jan 19, 2022 · 0 comments
Open

[Bug] 실서버 배포 관련 이슈 #123

Reone1 opened this issue Jan 19, 2022 · 0 comments
Assignees
Labels
bug Something isn't working Server

Comments

@Reone1
Copy link
Collaborator

Reone1 commented Jan 19, 2022

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(수정할 방법을 제안할 수 있다면 작성해 주세요)

  1. pm2에서 ts-node를 통해 해당 프로젝트 실행을 하면 가능합니다. ( 현재 처리해둔 방식 )
    이 방법을 사용하는 경우 pm2 모듈을 node_modules에 추가하여 진행해야 정상적으로 ts-node를 실행 할 수 있습니다.
    실행 스크립트
    npx pm2 start ts-node -- --type-check tsconfig-paths/register server/index.ts

해당 스크립트를 package.json에 적용해야 합니다.

  1. ts를 전부 build하여 배포합니다.
@Reone1 Reone1 added bug Something isn't working Server labels Jan 19, 2022
@Reone1 Reone1 changed the title [Bug] issue [Bug] 실서버 배포 관련 이슈 Jan 19, 2022
@Reone1 Reone1 self-assigned this Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Server
Projects
None yet
Development

No branches or pull requests

1 participant