Skip to content

fix(be): upgrade node to v22 to use esmodule in nestjs #2681

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

Merged
merged 4 commits into from
Apr 10, 2025

Conversation

dotoleeoak
Copy link
Member

@dotoleeoak dotoleeoak commented Apr 9, 2025

Description

#2677 에서 graphql-upload를 v17로 업그레이드하였는데, pure-esm만 지원하는 모듈로 현재 x86 환경에서 아래와 같은 에러가 발생합니다. NestJS는 pure-esm을 지원하지 않아 발생하는 문제입니다. (관련 이슈: nestjs/nest#8736)

/app/dist/apps/admin/main.js:171735
    app.use((0, _graphqlUploadExpress.default)({
                                              ^

TypeError: (0 , _graphqlUploadExpress.default) is not a function
    at bootstrap (/app/dist/apps/admin/main.js:171735:47)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v22.12.0에 도입된 require(esm) 지원을 적용합니다.
nodejs/node#55085

Additional context

Node.js 버전을 더 분명히 하도록 .nvmrc와 package.json의 engines 필드를 추가하였습니다.


Before submitting the PR, please make sure you do the following

@dotoleeoak dotoleeoak changed the title fix(be): support using esm modules from nestjs fix(be): upgrade node to v22 to use esmodule in nestjs Apr 9, 2025
@dotoleeoak dotoleeoak requested review from jimin9038 and Copilot April 9, 2025 17:06
@dotoleeoak dotoleeoak self-assigned this Apr 9, 2025
@dotoleeoak dotoleeoak requested review from jspark2000 and removed request for Copilot April 9, 2025 17:06
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 7 changed files in this pull request and generated no comments.

Files not reviewed (5)
  • .devcontainer/Dockerfile: Language not supported
  • .gitpod.Dockerfile: Language not supported
  • .nvmrc: Language not supported
  • apps/backend/Dockerfile: Language not supported
  • package.json: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/ci.yml:264

  • The smoke test instructions are currently only in comments; consider implementing an actual smoke test to verify backend health automatically.
# TODO: write smoke test for backend

@dotoleeoak dotoleeoak marked this pull request as ready for review April 9, 2025 17:07
@dotoleeoak dotoleeoak mentioned this pull request Apr 9, 2025
4 tasks
Copy link
Member

@jspark2000 jspark2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏼

@dotoleeoak dotoleeoak merged commit 5cea990 into main Apr 10, 2025
34 checks passed
@dotoleeoak dotoleeoak deleted the hotfix-nestjs-esm branch April 10, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants