Skip to content

Node importing broken #294

@bdougherty

Description

@bdougherty

I think this was broken by #263.

When importing using import * as Astronomy from 'astronomy-engine'; into a Node project that is marked as a module in package.json or into an .mjs file, it works correctly when using version 2.1.7, but if you use the latest 2.1.15 version, you will get the following error:

/Users/brad/Downloads/test/node_modules/astronomy-engine/esm/astronomy.js:38
export const C_AUDAY = 173.1446326846693;
^^^^^^

SyntaxError: Unexpected token 'export'

It seems to work in both versions when using require.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions