Skip to content

chore: [OFFNAL-100]: Android 프로젝트의 node 의존성 문제 해결#129

Merged
KanuKim97 merged 2 commits intodevelopfrom
chore/OFFNAL-100
Mar 24, 2026
Merged

chore: [OFFNAL-100]: Android 프로젝트의 node 의존성 문제 해결#129
KanuKim97 merged 2 commits intodevelopfrom
chore/OFFNAL-100

Conversation

@KanuKim97
Copy link
Copy Markdown
Contributor

요약

Android Studio Gradle Sync에서 발생하던 node 탐색 실패를 해결하기 위해, React Native Android 설정과 react-native-reanimated의 빌드 스크립트를 조정했습니다.

변경 내용

  1. /Users/kanukim97/Offnal-FE-Renew/android/build.gradle (line 2)
    REACT_NATIVE_NODE_MODULES_DIR를 루트 Gradle ext에 추가해서, RN 라이브러리들이 node 대신 node_modules/react-native를 직접 참조할 수 있게 했습니다.

  2. /Users/kanukim97/Offnal-FE-Renew/android/app/build.gradle (line 5)
    앱 모듈 ext에 REACT_NATIVE_NODE_MODULES_DIR, REACT_NATIVE_WORKLETS_NODE_MODULES_DIR를 추가했습니다.
    nodeExecutableAndArgs를 환경변수 NODE_BINARY 또는 로컬 설치 경로를 우선 사용하도록 변경했습니다.

  3. /Users/kanukim97/Offnal-FE-Renew/android/settings.gradle (line 4)
    autolink 단계에서 node 의존도를 줄이고, 명시적으로 CLI를 실행하도록 수정했습니다.

  4. /Users/kanukim97/Offnal-FE-Renew/node_modules/react-native-reanimated/android/build.gradle (line 15)
    react-native-reanimated가 node를 직접 호출하던 부분을 NODE_BINARY/로컬 경로 기반으로 바꿨습니다.
    버전 검증용 스크립트도 같은 node 경로를 사용하도록 수정했습니다.

결과

  • 로컬에서 ./gradlew help가 정상 통과했습니다.
  • 이제 Android Studio의 Sync Project with Gradle Files가 node 미발견 오류 없이 진행될 가능성이 높습니다.

주의

  • node_modules/react-native-reanimated/android/build.gradle는 벤더 패치라서, 의존성을 재설치하면 다시 적용이 필요할 수 있습니다.

@KanuKim97 KanuKim97 self-assigned this Mar 24, 2026
@KanuKim97 KanuKim97 added ⛔️ bug 버그, 및 어떤 기능이 예상 동작을 하지 않는 경우, 해당 라벨을 적용합니다. 🤖Android 안드로이드 기기의 버그 및 안드로이드 기기의 작업이 필요한 경우, 해당 라벨을 적용합니다. labels Mar 24, 2026
@KanuKim97 KanuKim97 marked this pull request as ready for review March 24, 2026 15:54
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 Pull Request는 Android Studio Gradle Sync 과정에서 발생하는 Node 탐색 실패 문제를 해결합니다. React Native Android 프로젝트의 Gradle 설정 파일들을 수정하여 Node 실행 경로를 동적으로 탐색하고 명시적으로 지정함으로써, 빌드 환경의 안정성을 높이고 개발자들이 Node 관련 오류 없이 프로젝트를 동기화할 수 있도록 개선했습니다.

Highlights

  • 루트 Gradle Node 모듈 경로 설정: 루트 Gradle extREACT_NATIVE_NODE_MODULES_DIR를 추가하여 React Native 라이브러리가 node_modules/react-native를 직접 참조하도록 변경했습니다.
  • 앱 모듈 Node 실행 경로 동적 탐색: 앱 모듈 extREACT_NATIVE_NODE_MODULES_DIRREACT_NATIVE_WORKLETS_NODE_MODULES_DIR를 추가하고, nodeExecutableAndArgs를 환경 변수 NODE_BINARY 또는 로컬 설치 경로를 우선 탐색하여 사용하도록 수정했습니다.
  • settings.gradle의 Autolink Node 경로 명시: settings.gradle에서 autolinkLibrariesFromCommand 호출 시 Node 실행 경로를 명시적으로 지정하도록 변경하여 Node 의존성 문제를 해결했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a dynamic mechanism to locate the Node.js executable for React Native builds within the Android Gradle configuration. It adds REACT_NATIVE_NODE_MODULES_DIR and REACT_NATIVE_WORKLETS_NODE_MODULES_DIR extensions and a findNodeBinary function that attempts to find Node.js using an environment variable, a list of common hardcoded paths, and a fallback to 'node'. The review comments highlight two main areas for improvement: the hardcoded Node.js paths may cause build failures on non-macOS environments or for users with different Node.js installations, suggesting more portable solutions; and the findNodeBinary function is duplicated across android/app/build.gradle and android/settings.gradle, which should be refactored to a central location for better maintainability.

@KanuKim97 KanuKim97 merged commit ddd498d into develop Mar 24, 2026
3 checks passed
@KanuKim97 KanuKim97 deleted the chore/OFFNAL-100 branch March 24, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖Android 안드로이드 기기의 버그 및 안드로이드 기기의 작업이 필요한 경우, 해당 라벨을 적용합니다. ⛔️ bug 버그, 및 어떤 기능이 예상 동작을 하지 않는 경우, 해당 라벨을 적용합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant