jd-opensource / drip-form

基于React和JSONSchema的动态表单解决方案
https://jd-opensource.github.io/drip-form/
MIT License
613 stars 73 forks source link

./node_modules/@monaco-editor/react/dist/index.mjs #263

Closed hqylss111 closed 1 year ago

hqylss111 commented 1 year ago

Have you read the Contributing Guidelines on issues?

Description

./node_modules/@monaco-editor/react/dist/index.mjs Can't import the named export 'memo' from non EcmaScript module (only default export is available) 无法从非 EcmaScript 模块导入指定的导出“备忘录”(只有默认导出可用)

webpack版本5.0 "react": "^17.0.2", "react-app-polyfill": "^2.0.0", "react-dev-utils": "^11.0.3", "react-dom": "^17.0.2",

Self-service

mengshang918 commented 1 year ago

可以提供一下复现的demo,方便排查。

hqylss111 commented 1 year ago

这个解决了 是你的子包里面的 @monaco-editor/react 这个包存在版本问题。 要么锁定子包版本 要么要更新最新版本。 不支持es module

mengshang918 commented 1 year ago

使用的版本是啥?可以使用最新的alpha版本试一试,如果还是有问题,可以提供复现demo或者提供pr。感谢

hqylss111 commented 1 year ago

使用的版本是^0.8.0 原库问题解答: https://github.com/suren-atoyan/monaco-react/issues/477#issuecomment-1531837265 目前使用的是4.4.6. resolutions":{ "@monaco-editor/react": "4.4.6" } 使用的yarn 锁定子版本解决的问题。

github-actions[bot] commented 1 year ago

This issue has been automatically marked as no-issue-activity because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.