You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
Has Node.js v12.0.0 broken something to do with using esm in the REPL?
$ npm install geodesy esm
$ nvm use 11.14.0
Now using node v11.14.0 (npm v6.7.0)
$ node -r esm
> import LatLon from 'geodesy/latlon-spherical';
undefined
> d = new LatLon(52, 0).distanceTo(new LatLon(48, 2));
467138.7758206903
>
$
$ nvm use 12.0.0
Now using node v12.0.0 (npm v6.9.0)
$ node -r esm
Welcome to Node.js v12.0.0.
Type ".help" for more information.
> import LatLon from 'geodesy/latlon-spherical';
Thrown:
TypeError: Cannot read property 'exports' of undefined
at repl:1
at repl:1
at Script.runInThisContext (vm.js:123:20)
at REPLServer.defaultEval (repl.js:358:29)
at bound (domain.js:415:14)
at REPLServer.runBound [as eval] (domain.js:428:12)
at REPLServer.onLine (repl.js:665:10)
>
$
Or is there something we should be doing differently now?
(This is with esm v3.2.22).
The text was updated successfully, but these errors were encountered:
Has Node.js v12.0.0 broken something to do with using
esm
in the REPL?Or is there something we should be doing differently now?
(This is with
esm
v3.2.22).The text was updated successfully, but these errors were encountered: