-1

./node_modules/react-leaflet/esm/Pane.js 25:37 模块解析失败:意外令牌 (25:37) 使用这些加载器处理了文件:

  • ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js 你可能需要一个额外的加载器来处理这些加载器的结果。| } |

const parentPaneName = props.pane ?? 上下文.窗格; | 常量 parentPane = parentPaneName ?context.map.getPane(parentPaneName):未定义;| 常量元素 = context.map.createPane(name, parentPane); 处理这些加载器的结果。

我目前在运行 react-leaflet v3.2.1 时遇到此错误。我目前正在使用反应 v1.0.0。和反应脚本 v4.0.3。请问我该如何解决这个问题?

4

1 回答 1

0

我按照以下步骤操作:
1-https://github.com/facebook/create-react-app/issues/9468#issuecomment-694191642
2-https://github.com/PaulLeCam/react-leaflet/issues/877# issuecomment-842167629
然后它修复了!

于 2021-08-18T13:48:57.107 回答