Skip to content

"Must use import to load ES Module" problem #79

@karianpour

Description

@karianpour

With node 12 , when I tries the sample I got the following error.
It looks like it cannot import the module.
Does it support node 12?

$> node -r esm
Welcome to Node.js v12.16.1.
> import LatLon from 'geodesy/latlon-spherical.js';
.../node_modules/geodesy/latlon-spherical.js:1
Uncaught:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: .../node_modules/geodesy/latlon-spherical.js
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1174:13) {
  code: 'ERR_REQUIRE_ESM'
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions