简体   繁体   English

成功构建后,IBEX 仪表板地图中断

[英]IBEX Dashboard maps break after successful build

I've setup IBEX dashboard as per instructions at https://github.com/CatalystCode/ibex-dashboard on Windows 10. I made changes in timeline.ts to have more timespan options that works fine.我已经按照 Windows 10 上https://github.com/CatalystCode/ibex-dashboard上的说明设置了 IBEX 仪表板。我在时间线.ts 中进行了更改,以获得更多可以正常工作的时间跨度选项。

Problem is after build maps are breaking on mouse over with following error:问题是在构建地图在鼠标悬停时出现以下错误后:

react-leaflet-markercluster.min.js:1 Uncaught TypeError: Converting circular structure to JSON
at JSON.stringify (<anonymous>)
at isArraysEqual (react-leaflet-markercluster.min.js:1)
at r.value (react-leaflet-markercluster.min.js:1)
at ReactCompositeComponent.js:610
at measureLifeCyclePerf (ReactCompositeComponent.js:75)
at ReactCompositeComponentWrapper.updateComponent (ReactCompositeComponent.js:609)
at ReactCompositeComponentWrapper.receiveComponent (ReactCompositeComponent.js:546)
at Object.receiveComponent (ReactReconciler.js:124)
at Object.updateChildren (ReactChildReconciler.js:109)
at ReactDOMComponent._reconcilerUpdateChildren (ReactMultiChild.js:206)
at ReactDOMComponent._updateChildren (ReactMultiChild.js:310)
at ReactDOMComponent.updateChildren (ReactMultiChild.js:297)
at ReactDOMComponent._updateDOMChildren (ReactDOMComponent.js:942)
at ReactDOMComponent.updateComponent (ReactDOMComponent.js:760)
at ReactDOMComponent.receiveComponent (ReactDOMComponent.js:722)
at Object.receiveComponent (ReactReconciler.js:124)
at ReactCompositeComponentWrapper._updateRenderedComponent (ReactCompositeComponent.js:753)
at ReactCompositeComponentWrapper._performComponentUpdate (ReactCompositeComponent.js:723)
at ReactCompositeComponentWrapper.updateComponent (ReactCompositeComponent.js:644)
at ReactCompositeComponentWrapper.receiveComponent (ReactCompositeComponent.js:546)
at Object.receiveComponent (ReactReconciler.js:124)
at Object.updateChildren (ReactChildReconciler.js:109)
at ReactDOMComponent._reconcilerUpdateChildren (ReactMultiChild.js:206)
at ReactDOMComponent._updateChildren (ReactMultiChild.js:310)
at ReactDOMComponent.updateChildren (ReactMultiChild.js:297)
at ReactDOMComponent._updateDOMChildren (ReactDOMComponent.js:942)
at ReactDOMComponent.updateComponent (ReactDOMComponent.js:760)
at ReactDOMComponent.receiveComponent (ReactDOMComponent.js:722)
at Object.receiveComponent (ReactReconciler.js:124)
at ReactCompositeComponentWrapper._updateRenderedComponent (ReactCompositeComponent.js:753)
at ReactCompositeComponentWrapper._performComponentUpdate (ReactCompositeComponent.js:723)
at ReactCompositeComponentWrapper.updateComponent (ReactCompositeComponent.js:644)
at ReactCompositeComponentWrapper.receiveComponent (ReactCompositeComponent.js:546)
at Object.receiveComponent (ReactReconciler.js:124)
at Object.updateChildren (ReactChildReconciler.js:109)
at ReactDOMComponent._reconcilerUpdateChildren (ReactMultiChild.js:206)
at ReactDOMComponent._updateChildren (ReactMultiChild.js:310)
at ReactDOMComponent.updateChildren (ReactMultiChild.js:297)
at ReactDOMComponent._updateDOMChildren (ReactDOMComponent.js:942)
at ReactDOMComponent.updateComponent (ReactDOMComponent.js:760)
at ReactDOMComponent.receiveComponent (ReactDOMComponent.js:722)
at Object.receiveComponent (ReactReconciler.js:124)
at ReactCompositeComponentWrapper._updateRenderedComponent (ReactCompositeComponent.js:753)
at ReactCompositeComponentWrapper._performComponentUpdate (ReactCompositeComponent.js:723)
at ReactCompositeComponentWrapper.updateComponent (ReactCompositeComponent.js:644)
at ReactCompositeComponentWrapper.receiveComponent (ReactCompositeComponent.js:546)
at Object.receiveComponent (ReactReconciler.js:124)
at ReactCompositeComponentWrapper._updateRenderedComponent (ReactCompositeComponent.js:753)
at ReactCompositeComponentWrapper._performComponentUpdate (ReactCompositeComponent.js:723)
at ReactCompositeComponentWrapper.updateComponent (ReactCompositeComponent.js:644)

If I make the same change in the minified js file then maps work fine, but as you can imagine it won't work long term.如果我在缩小的 js 文件中进行相同的更改,则映射可以正常工作,但是您可以想象它不会长期工作。

I'm trying to figure out what is different about my setup that is causing the breaking change when I build it.我试图弄清楚我的设置有什么不同导致我在构建它时发生了重大变化。

I think this might be caused because of the map plugin:https://github.com/YUzhva/react-leaflet-markercluster/issues/55我认为这可能是由于地图插件造成的:https ://github.com/YUzhva/react-leaflet-markercluster/issues/55

I got this problem as well, but changing the code to:我也遇到了这个问题,但是将代码更改为:

./client/src/components/generic/MapData.tsx: ./client/src/components/generic/MapData.tsx:

  promise.then(results => {
    // let markupPopup = (popup && L.popup().setContent(popup)) || null;

    if (results.length) {
      markers.push({ position: [ results[0].y, results[0].x] });
    }
  });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM