Skip to content

Missing dependency for @types/launchdarkly-eventsource #705

@tlevesque-ueat

Description

@tlevesque-ueat

Describe the bug

Got this error after upgrading from 6.1.3 to 6.4.3:

tsc -b tsconfig.build.json
Error: node_modules/unleash-client/lib/repository/index.d.ts(9,29): error TS7016: Could not find a declaration file for module 'launchdarkly-eventsource'. '/home/runner/work/(redacted)/node_modules/launchdarkly-eventsource/lib/eventsource.js' implicitly has an 'any' type.
Try npm i --save-dev @types/launchdarkly-eventsource if it exists or add a new declaration (.d.ts) file containing declare module 'launchdarkly-eventsource';

Shouldn't @types/launchdarkly-eventsource be listed as a dependency?

Steps to reproduce the bug

In a project using Typescript, upgrade from 6.1.3 to 6.4.3 (not sure when the dependency on launchdarkly-eventsource was introduced, maybe 6.3.0)
Try to compile.

Expected behavior

Should compile without issue

Logs, error output, etc.

Error: node_modules/unleash-client/lib/repository/index.d.ts(9,29): error TS7016: Could not find a declaration file for module 'launchdarkly-eventsource'. '/home/runner/work/(redacted)/node_modules/launchdarkly-eventsource/lib/eventsource.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/launchdarkly-eventsource` if it exists or add a new declaration (.d.ts) file containing `declare module 'launchdarkly-eventsource';`

Screenshots

No response

Additional context

No response

Unleash version

6.4.3

Subscription type

Open source

Hosting type

Hosted by Unleash

SDK information (language and version)

No response

Metadata

Metadata

Assignees

Labels

bugdependenciesPull requests that update a dependency file

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions