Skip to content

Building app with node-eventstore-client fails due to long type in typescript #105

@ericlau-solid

Description

@ericlau-solid

This works perfectly fine in development. When attempting to run a build (ie. tsc), I get the following errors. Note that
"@types/long": "^4.0.1", no longer exists, "long": "^5.2.4", has its own typescript definition. I removed @types/long from my app's package.json, but that only makes it worse. (all errors due to index.d.ts cannot find name 'Long')

Did some digging. Long is having some goofiness with typescript 5.2. dcodeIO/long.js#130.

Ultimately the app should work without any @types/long

node_modules/node-eventstore-client/index.d.ts:2:23 - error TS1261: Already included file name '/Users/ericlau/WebstormProjects/card-club-mgt/api/node_modules/@types/Long/index.d.ts' differs from file name '/Users/ericlau/WebstormProjects/card-club-mgt/api/node_modules/@types/long/index.d.ts' only in casing.
  The file is in the program because:
    Type library referenced via 'Long' from file '/Users/ericlau/WebstormProjects/card-club-mgt/api/node_modules/node-eventstore-client/index.d.ts' with packageId '@types/long/index.d.ts@4.0.2'
    Entry point for implicit type library 'long' with packageId '@types/long/index.d.ts@4.0.2'

2 /// <reference types="Long" />
                        ~~~~


Found 1 error in node_modules/node-eventstore-client/index.d.ts:2

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