`react-dom/server` cannot be resolved with `unstable_enablePackageExports` and condition `browser`
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- javascript
- 领域
- tooling
调研方向
首先使用 unstable_enablePackageExports 和所示的 browser 条件重现 react-dom/server 的解析。检查 package.json 中的 exports 和 browser 映射,包括 server.browser.js;当 Metro 在没有回退警告的情况下解析该导入时,即完成。
由索引模型根据 Issue 内容生成。
描述
(As reported by @EvanBacon)
Metro cannot resolve react-dom/server with unable_enablePackageExports (and condition browser?), reporting:
warning: Attempted to import the module "/Users/evanbacon/Documents/GitHub/expo/node_modules/react-dom/server.browser.js" which is not listed in the "exports" of "/Users/evanbacon/Documents/GitHub/expo/node_modules/react-dom". Falling back to file-based resolution. Consider updating the call site or asking the package maintainer(s) to expose this API.
Conditions
unstable_conditionNames: [ 'node', 'require' ],
unstable_conditionsByPlatform: { web: [ 'browser' ] },
package.json
"exports": {
".": "./index.js",
"./client": "./client.js",
"./server": {
"deno": "./server.browser.js",
"worker": "./server.browser.js",
"browser": "./server.browser.js",
"default": "./server.node.js"
},
"./server.browser": "./server.browser.js",
"./server.node": "./server.node.js",
"./profiling": "./profiling.js",
"./test-utils": "./test-utils.js",
"./package.json": "./package.json"
},
"browser": {
"./server.js": "./server.browser.js"
},
- 主要语言
- JavaScript
- 星标
- 5.7k
- 派生
- 706
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 65
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
react/metro 的其他 Issue
-
constant-folding-plugin emits 0/0 (NaN) for arithmetic on destructured bindings可能已有人在做 @cpruijsen 于 17 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
维护者通常 2 天内回复
-
难度 4/5 1-2 天 新手友好度 35/100
维护者通常 2 天内回复
-
[0.83.x] Backport micromatch removal and dotfile/multipart watcher fix together可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 2 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 76/100
apex-dev-tools/apex-log-parser#199 ·
维护者通常 1 天内回复
-
enhancement good first issue hacktoberfest help wanted
难度 2/5 1-3 小时 新手友好度 78/100
-
ReadBufferStream.addBuffer adds the full ArrayBuffer of a typed array view, and ignores its byteOffset可能已有人在做 @wayfarer3130 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Expo 57 example: pnpm install fails with ERR_PNPM_TRUST_DOWNGRADE可能已有人在做 @github-actions 今天认领。 未关闭bug react-native team/client-libraries
难度 2/5 1-3 小时 新手友好度 68/100
PostHog/posthog-js#5442 · 1 条评论 ·
维护者通常 1 天内回复