Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughYarn PnP 관련 정리: Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Node as Node (실행 환경)
participant Loader as .pnp.loader.mjs
participant PnP as .pnp.cjs (PnP API)
participant FS as 파일 시스템
participant Module as 모듈
Note over Node,Loader: 기존(삭제 전) 흐름
Node->>Loader: ESM 로드/해석 요청 (import)
Loader->>PnP: 패키지 해석 요청 (PnP API)
PnP-->>Loader: 해석 결과 (가상 경로)
Loader->>FS: 가상화/포터블 매핑 후 파일 읽기
FS-->>Loader: 파일 콘텐츠
Loader->>Module: 반환된 모듈 로드
sequenceDiagram
autonumber
participant Node as Node (실행 환경)
participant Resolver as Node 내장 해석기
participant FS as 파일 시스템
participant Module as 모듈
Note over Node,Resolver: 새로운(현재) 흐름
Node->>Resolver: ESM 로드/해석 요청 (import)
Resolver->>FS: 표준 해석 및 파일 접근
FS-->>Resolver: 파일 콘텐츠
Resolver->>Module: 모듈 로드
예상 코드 리뷰 난이도🎯 4 (복잡) | ⏱️ ~45분 시
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.gitignore:
- Line 31: 현재 .gitignore에 ".yarnrc.yml"이 들어가 있어 팀 공통 Yarn 설정을 버전관리에서 제외하고 있으니,
해당 파일을 추적 대상으로 되돌리려면 .gitignore에서 ".yarnrc.yml" 항목을 삭제하거나 명시적으로 예외
처리(!.yarnrc.yml)를 추가하여 .yarnrc.yml이 깃에 포함되도록 변경하세요; 변경은 .yarnrc.yml 파일명을 직접 참조하여
적용하면 됩니다.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d4d2e9df-f001-4b0c-aae9-4ae41735445c
📒 Files selected for processing (3)
.gitignore.pnp.cjs.pnp.loader.mjs
💤 Files with no reviewable changes (1)
- .pnp.loader.mjs
2seb2
left a comment
There was a problem hiding this comment.
Yarn Berry PnP 환경에서 OS 차이로 발생하던 경로 문제를 해결해서, 이제는 누구든 레포를 클론한 뒤 install만 하면 각자 환경에 맞게 정상적으로 세팅될 것 같네용!
#️⃣ 관련 이슈
⏰ 작업 시간
💻 작업 내용
작업하면서 고민한 부분
OS 환경 차이로 인한 모듈 참조 에러 (react-dom 찾기 실패)
문제 현상
원인 분석
.pnp.cjs의 역할
하드코딩된 상대 경로: Mac 환경에서 생성된 .pnp.cjs에는 글로벌 캐시를 향한 상대 경로(../../../../.yarn/berry/cache/)가 기록되어 있었습니다.
OS 경로 불일치: Windows의 실제 글로벌 캐시 경로는 AppData/Local/Yarn/Berry에 위치하여, Mac 기준의 상대 경로로는 접근이 불가능했습니다.
Git 추적 문제: 이미 .pnp.cjs가 Git에 커밋되어 있어, 다른 환경에서 yarn install을 해도 기존 파일을 덮어쓰지 못하고 잘못된 경로를 계속 참조하고 있었습니다.
해결 방법
yarn config set globalFolder ./yarn-cache 설정을 통해 캐시 위치를 프로젝트 내부로 강제하여 환경 독립적인 상대 경로를 확보했습니다.
Git에서 관리되던 .pnp.* 파일들을 추적 해제하여 각 개발 환경에서 yarn install 시 본인의 OS에 맞는 로더가 생성되도록 수정했습니다.
👀 리뷰 포인트
📘 참고 자료
Summary by CodeRabbit
릴리스 노트