ndjson-cli icon indicating copy to clipboard operation
ndjson-cli copied to clipboard

Require: Cannot find module

Open davidshumway opened this issue 7 years ago • 0 comments

Hi,

Trying to use the d3.polygon module from the command line. Specifically, the idea is to utilize d3.polygonContains to determine whether a polygon contains a specific latitude / longitude pair.

I think the starting point is required the d3.polygon module.

However, I am receiving an error when trying to require the d3.polygon module, where d3Polygon.js is in the current directory:

$ ndjson-split --require=d3Polygon.js 'uscounties.ndjson' > testing /usr/lib/node_modules/ndjson-cli/node_modules/resolve/lib/sync.js:45 throw err; ^

Error: Cannot find module 'd3Polygon.js' from '/home/A/B/C' at Function.module.exports [as sync] (/usr/lib/node_modules/ndjson-cli/node_modules/resolve/lib/sync.js:43:15) at module.exports (/usr/lib/node_modules/ndjson-cli/resolve.js:11:22) at module.exports (/usr/lib/node_modules/ndjson-cli/requires.js:6:20) at Command. (/usr/lib/node_modules/ndjson-cli/node_modules/commander/index.js:412:13) at emitOne (events.js:96:13) at Command.emit (events.js:188:7) at Command.parseOptions (/usr/lib/node_modules/ndjson-cli/node_modules/commander/index.js:733:14) at Command.parse (/usr/lib/node_modules/ndjson-cli/node_modules/commander/index.js:471:21) at Object. (/usr/lib/node_modules/ndjson-cli/ndjson-split:15:6) at Module._compile (module.js:577:32)

davidshumway avatar Sep 27 '18 03:09 davidshumway