"TypeError: geolib.isPointInCircle is not a function"
jupiter8888 opened this issue · comments
Hi, i've tried really hard to make this node work on ubuntu v.16.04.5 node-red v.19.05, nodejs v.6.17.1. With the help of the few examples i found the node always output this. Her's the log:
2 Jun 17:32:29 - [error] [geofence:node-red] TypeError: geolib.isPointInCircle is not a function
at geofenceNode.<anonymous> (/home/ndip/.node-red/node_modules/node-red-node-geofence/geofence.js:55:36)
at emitOne (events.js:96:13)
at geofenceNode.emit (events.js:188:7)
at geofenceNode.Node.receive (/usr/lib/node_modules/node-red/red/runtime/nodes/Node.js:215:14)
at FunctionNode.Node.send (/usr/lib/node_modules/node-red/red/runtime/nodes/Node.js:202:14)
at sendResults (/usr/lib/node_modules/node-red/nodes/core/core/80-function.js:52:18)
at FunctionNode.<anonymous> (/usr/lib/node_modules/node-red/nodes/core/core/80-function.js:225:21)
at emitOne (events.js:96:13)
at FunctionNode.emit (events.js:188:7)
at FunctionNode.Node.receive (/usr/lib/node_modules/node-red/red/runtime/nodes/Node.js:215:14)
at InjectNode.Node.send (/usr/lib/node_modules/node-red/red/runtime/nodes/Node.js:137:22)
at InjectNode.<anonymous> (/usr/lib/node_modules/node-red/nodes/core/core/20-inject.js:78:26)
at emitOne (events.js:96:13)
at InjectNode.emit (events.js:188:7)
at InjectNode.Node.receive (/usr/lib/node_modules/node-red/red/runtime/nodes/Node.js:215:14)
at /usr/lib/node_modules/node-red/nodes/core/core/20-inject.js:117:22
I reinstalled the geolib npm package locally and it has no effect. Any ideas?
Exactly WHICH node-red node did you install. node-red-contrib-geofence
or node-red-node-geofence
This repo is for node-red-node-geofence
the other node is a broken fork
OK, it looks like geolib released a new version (v3.0.x) which changes the name of the isPointInCircle()
function to isPointInRadius()
The package.json has a bad wild card so it matches everything. I'll push a new version that pins it to version v2 of geolib
I installed node-red-node-geofence. Thanks for looking at it.
I have pushed version 0.1.1 which should be pinned at geolib v2.0x.
You will need to remove the old version and the version of geolib you currently have installed. Then make sure you have v0.1.1 installed when you reinstall it.