Repository navigation
Node.js 버전이 낮으면 런처가 버전 부족을 먼저 알리게 했다 - #97
Merged
Merged
Conversation
플랫폼 패키지 5개는 optional이고 engines.node >=22.14.0 이라서 Node 20에서는 npm이 경고 없이 설치를 건너뛴다. 그러면 런처가 바이너리를 못 찾고 "--omit=optional 없이 재설치하라"는 엉뚱한 안내를 냈다. 실제로 이 안내 때문에 설치가 깨진 것으로 오진한 적이 있다. - 런처가 플랫폼을 고르기 전에 process.version 을 자기 package.json 의 engines.node 와 비교한다. 최소 버전은 따로 적지 않고 manifest 에서 읽으므로 config.mjs 의 nodeEngine 하나가 원본으로 남는다(check.mjs 가 일치를 검사). - 판정할 수 없는 engines 형식은 조용히 통과시키지 않고 오류로 처리한다. - 테스트 3개 추가(경계값 v22.13.1/v22.14.0 포함), npm test 17개와 npm run check 통과. Docker 실측(rc.4 전역 설치 후 런처만 교체): - node:20-slim v20.20.2: 기존 "--omit=optional" 안내 → "XGEN requires Node.js 22.14.0 or later (current: v20.20.2)" 로 바뀌고 exit 1 - node:22-slim v22.23.2: xgen 0.1.0-rc.4, exit 0 (기존 동작 유지) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
플랫폼 패키지는 optional이고
engines.node >=22.14.0이라서, Node 20에서는 npm이 아무 말 없이 설치를 건너뛴다. 그러면 런처가Reinstall @xgen-ai/cli without --omit=optional.이라고 안내하는데, 실제 원인과 다른 안내다.변경
npm/packages/cli/lib/platform.cjs에checkNodeVersion(engine, version)을 추가했다. 런처는 플랫폼을 고르기 전에 이 검사를 먼저 한다.package.json의engines.node에서 읽는다. 원본은config.mjs의nodeEngine하나고,check.mjs가 둘이 같은지 이미 검사하고 있다.검증
npm test17개 통과(새 테스트 3개 포함),npm run check통과node:20-slim(v20.20.2):XGEN requires Node.js 22.14.0 or later (current: v20.20.2). Upgrade Node.js, then reinstall @xgen-ai/cli.출력, exit 1node:22-slim(v22.23.2):xgen 0.1.0-rc.4, exit 0🤖 Generated with Claude Code