Turfjs / turf

A modular geospatial engine written in JavaScript and TypeScript
https://turfjs.org/
MIT License
9.3k stars 941 forks source link

Cannot find module 'turf-collect' #375

Closed Turbo87 closed 8 years ago

Turbo87 commented 8 years ago

It looks like turf-collect is missing from https://github.com/Turfjs/turf/blob/master/packages/turf/package.json

Turbo87 commented 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?

tmcw commented 8 years ago

Yep, package name in turf-collect hadn't been updated. Just published a fix.

wprater commented 7 years ago

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.

DenisCarriere commented 7 years ago

@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
wprater commented 7 years ago

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?

DenisCarriere commented 7 years ago

Yes Turf is now namespaced @turf/turf for the recent releases.