Closed Turbo87 closed 8 years ago
but I just noticed that turf-collect
isn't published on NPM, so maybe https://github.com/Turfjs/turf/blob/master/packages/turf/index.js#L16 is actually wrong?
Yep, package name in turf-collect hadn't been updated. Just published a fix.
Having a similar issue with turf-distance
running on Node 8. any more input I can provide to help determine the cause? It looks as everything is defined correctly and Im able to use @turf/helpers
and @turf/inside
.
I used yarn to install the turf
dependency.
@wprater not getting any errors using Node 8, can you provide a code snippet of what's not working.
Example (is working)
$ node -v
v8.0.0
$ yarn add @turf/turf
const turf = require('@turf/turf');
turf.distance([0, 0], [1,1])
//= 157.2987453847275
I installed turf like such:
yarn add turf
then tried to load the distance module like so:
const turfDistance = require('@turf/distance');
Error: Cannot find module '@turf/distance'
at Function.Module._resolveFilename (module.js:485:15)
[...]
using "turf": "^3.0.14"
so it looks like I needed to add the namespaced version of turf @turf/turn
?
Yes Turf is now namespaced @turf/turf
for the recent releases.
It looks like
turf-collect
is missing from https://github.com/Turfjs/turf/blob/master/packages/turf/package.json