GrapesJS / GrapesJS/react

[ERROR] Could not resolve "react" / "react-dom"

Đang mở
#3 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
183
Fork
44
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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 │

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Tái hiện bản build `remix dev` được báo cáo và kiểm tra `../node_modules/@grapesjs/react/dist/index.js`, nơi các import của `react` và `react-dom` không thể được phân giải. Xác định thay đổi cần thiết đối với package hoặc setup để cả hai import đều được phân giải, sau đó xác nhận rằng bản build Remix hoàn tất mà không có các lỗi này.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
react
Lĩnh vực
build-system, frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.