小编Tah*_*rab的帖子

模块解析失败:附加 babel_loader

我已经使用react-leaflet有一段时间了,几周后我删除了node_modules内的文件并重新安装了它们,我根本没有触及react-leaflet版本,但是当我尝试运行该项目时,它给了我一个错误。


./node_modules/@react-leaflet/core/esm/path.js 10:41 模块解析失败:意外的标记 (10:41) 文件已使用这些加载器处理:

  • ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js 您可能需要一个额外的加载器来处理这些加载器的结果。| useEffect(function updatePathOptions() { | if (props.pathOptions !== optionsRef.current) {
  const options = props.pathOptions ?? {};
Run Code Online (Sandbox Code Playgroud)

| element.instance.setStyle(选项); | optionsRef.current = 选项;


leaflet reactjs react-leaflet babel-loader react-leaflet-v3

3
推荐指数
1
解决办法
4231
查看次数