-
-
Notifications
You must be signed in to change notification settings - Fork 335
Closed
Labels
Description
Hi,
Apologies in advance if this is a node issue and not a geolib
issue, I'm not familiar with this error message.
Up to and including node v12.10.0
we have had no issue loading this library using the syntax:
const geolib = require('geolib');
since nodejs version v12.11.0
we are getting the following error:
internal/modules/cjs/loader.js:958
throw new ERR_REQUIRE_ESM(filename);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/travis/build/pelias/api/node_modules/geolib/lib/index.js
at Object.Module._extensions..js (internal/modules/cjs/loader.js:958:13)
at Module.load (internal/modules/cjs/loader.js:798:32)
at Function.Module._load (internal/modules/cjs/loader.js:711:12)
at Module.require (internal/modules/cjs/loader.js:838:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/travis/build/pelias/api/controller/placeholder.js:4:16)
at Module._compile (internal/modules/cjs/loader.js:945:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:962:10)
at Module.load (internal/modules/cjs/loader.js:798:32)
at Function.Module._load (internal/modules/cjs/loader.js:711:12)
rapomon, niklv, wangchou, peterboyer, LakshmiVasudevan and 13 more