--metroPort is documented, but the CLI rejects it as an unrecognized option
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- node.js, react-native, typescript
- 领域
- cli, testing-qa
调研方向
从 packages/cli/src/index.ts 中的 patchYargsOptions 开始,这里只把 harnessRunner 添加到 Jest 的选项中;比较 metroPort 是如何从 rn-harness.config.mjs 中读取的。在 apps/playground 中使用 --metroPort 8097 运行 CLI 进行复现。当该参数被接受并传递到配置中,或者 website/src/docs/api/cli.mdx 被修正为删除该参数时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
The CLI docs (website/src/docs/api/cli.mdx) list --metroPort <port>: "Set the preferred Metro port for this run. If the selected runner supports it and the port is busy, Harness will try the next available ports automatically." Passing it fails:
● Unrecognized CLI Parameter:
Unrecognized option "metroPort".
patchYargsOptions in packages/cli/src/index.ts adds only harnessRunner to Jest's options, so the flag never reaches the config; metroPort in rn-harness.config.mjs works. Either the option is added and passed on to the config, or the docs drop it.
System Info
System:
OS: Windows 11 10.0.26200
Binaries:
Node: 26.5.0
React Native Harness Version
1.5.0 (main at 58850ce)
Reproduction
https://github.com/callstackincubator/react-native-harness/blob/main/packages/cli/src/index.ts
Steps to reproduce
- In
apps/playground, runreact-native-harness --harnessRunner android --metroPort 8097. - Jest stops with "Unrecognized option "metroPort"".
- 主要语言
- TypeScript
- 星标
- 333
- 派生
- 20
- 平均合并
- 1 天 37 分钟
- 30 天内合并 PR
- 13
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstackincubator/react-native-harness 的其他 Issue
-
Windows Android SDK path not found可能已有人在做 @V3RON 于 37 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
callstackincubator/react-native-harness#183 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
callstackincubator/react-native-harness#128 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 15/100
callstackincubator/react-native-harness#247 ·
维护者通常 1 天内回复
-
The pre-push hook builds the same packages twice at once可能已有人在做 @V3RON 于 1 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 35/100
callstackincubator/react-native-harness#225 ·
维护者通常 1 天内回复
-
iOS simulator runs fail on Xcode 27 when the app is not installed可能已有人在做 @DaveyEke 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
callstackincubator/react-native-harness#223 ·
维护者通常 1 天内回复
查看 callstackincubator/react-native-harness 的全部 Issue
相似的 Issue
-
check:passed streams:edit
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
area:mcp bug has repro platform:vscode regression
难度 2/5 1-3 小时 新手友好度 68/100
anthropics/claude-code#103970 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build context未关闭bug javascript
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复