RBush is not a constructor
See original GitHub issueSample Code
https://codesandbox.io/s/turf-convex-error-h9pe5
import { point, featureCollection } from "@turf/helpers";
import convex from "@turf/convex";
// data from https://turfjs.org/docs/#convex
const points = featureCollection([
point([10.195312, 43.755225]),
point([10.404052, 43.8424511]),
point([10.579833, 43.659924]),
point([10.360107, 43.516688]),
point([10.14038, 43.588348]),
point([10.195312, 43.755225])
]);
const hull = convex(points); // This line generates error
Details
Turf Version: 6.5.0
Please provide the following when reporting an issue:
- The version of Turf you are using, and any other relevant versions.
- GeoJSON data as a gist file or geojson.io (filename extension must be
.geojson
). - Snippet of source code or for complex examples use jsfiddle.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:13
Top Results From Across the Web
webpack imported module is not a constructor - Stack Overflow
I created a small JS module which I intend to make an npm package, but for now is just on GitHub. This module...
Read more >rbush - npm
RBush is a high-performance JavaScript library for 2D spatial indexing of points and rectangles. It's based on an optimized R-tree data ...
Read more >rbush is not a constructor_多比熊的博客
今天使用webpack打包代码后启动时报了一个奇怪的错误,rbush不是一个构造函数幸运的是在github中有人遇到了类似的错误 RBush is not a constructor
Read more >@turf/convex examples - CodeSandbox
Turf Convex Error (forked)Error "RBush is not a constructor" · JamesLMilner · 3pojf · changqingom · 6xyb7 · Turf Convex Error (forked)Error "RBush...
Read more >RBush 3.1.0 - NuGet
An optional argument ( maxEntries ) to the constructor defines the maximum number of ... If the item being passed in is not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I can work out the
rbush
bundling issues withcollect
andunkink
(and in turn turf modules that rely on them such aslineSlice
) but fixingconvex
is complicated. We’d either need to getconcaveman
to use the ES5 version ofrbush
or to publish a compiled ES5 version. The other potential option is to maintain our own version ofconcaveman
but I’d really rather avoid that if possible.