Skip to content

Could not find a declaration file for module '@serialport/bindings-interface'.  #52

@rosek86

Description

@rosek86

Hello,

I get the following error when I try to use serialport in esm, is it something that can be adjusted in @serialport/bindings-interface.

error TS7016: Could not find a declaration file for module '@serialport/bindings-interface'. '(...)/node_modules/@serialport/bindings-interface/dist/index-esm.mjs' implicitly has an 'any' type.
  There are types at '(...)/node_modules/@serialport/bindings-interface/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@serialport/bindings-interface' library may need to update its package.json or typings.

4 import { PortInfo } from '@serialport/bindings-interface';
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

NOTE: when I copy index.d.ts file to index-esm.d.mts the error disappears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions