[ERROR] Could not resolve "react" / "react-dom"
- 主要语言
- TypeScript
- 星标
- 183
- 派生
- 44
- PR 合并指标
- 30 天内没有已合并 PR
描述
Doesn't seem to work with Remix, get the following errors. I've tried a number of workarounds with no prevail. Any suggestions on how to remedy these errors?
11:21:51 │ remix │
11:21:51 │ remix │ 💿 remix dev
11:21:51 │ remix │
11:21:51 │ webhooks │ Sending APP_UNINSTALLED webhook to app server
11:21:51 │ remix │ info building...
11:21:52 │ remix │ ✘ [ERROR] Could not resolve "react"
11:21:52 │ remix │
11:21:52 │ remix │ ../node_modules/@grapesjs/react/dist/index.js:1:150:
11:21:52 │ remix │ 1 │ ...as C, memo as A, useMemo as Ne, createElement as Ve } from "react";
11:21:52 │ remix │ ╵ ~~~~~~~
11:21:52 │ remix │
11:21:52 │ remix │ You can mark the path "react" as external to exclude it from the bundle, which will remove this error.
11:21:52 │ remix │
11:21:52 │ remix │
11:21:52 │ remix │ ✘ [ERROR] Could not resolve "react-dom"
11:21:52 │ remix │
11:21:52 │ remix │ ../node_modules/@grapesjs/react/dist/index.js:2:35:
11:21:52 │ remix │ 2 │ import { createPortal as Tt } from "react-dom";
11:21:52 │ remix │ ╵ ~~~~~~~~~~~
11:21:52 │ remix │
11:21:52 │ remix │ You can mark the path "react-dom" as external to exclude it from the bundle, which will remove this error.
11:21:52 │ remix │
11:21:52 │ remix │
贡献指南
这个仓库没有索引到贡献指南
调研方向
重现报告中的 `remix dev` 构建,并检查 `../node_modules/@grapesjs/react/dist/index.js`,其中对 `react` 和 `react-dom` 的导入无法解析。确定使这两个导入都能解析所需的软件包或设置更改,然后确认 Remix 构建能够在没有这些错误的情况下完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react
- 领域
- build-system, frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100