Skip to content

lf-api-client-core@1.1.19 won't load under native Node ESM (missing .js on imports) #64

Description

@timmyGr

The published ESM build has relative imports without file extensions, which Node's ESM loader rejects. Bundlers and tsx tolerate it, but plain node doesn't.

import { ApiException } from './ApiException';      // needs .js
import { ProblemDetails } from './ProblemDetails';  // needs .js

repro:

npm i @laserfiche/lf-api-client-core@1.1.19
node --input-type=module -e "import('@laserfiche/lf-api-client-core')"

error:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../dist/lib/ApiException'
imported from .../dist/lib/BaseTokenClient.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions