Skip to content

Types unresolvable in @bugsnag/electron since v7.23.0 #2523

@mark-dr

Description

@mark-dr

TypeScript fails to resolve types, causing tsc failures. Error:

Could not find a declaration file for module '@bugsnag/electron'. '[REDACTED]/node_modules/@bugsnag/electron/src/notifier.js' implicitly has an 'any' type.
There are types at '[REDACTED]/node_modules/@bugsnag/electron/types/notifier.d.ts', but this result could not be resolved when respecting package.json "exports". The '@bugsnag/electron' library may need to update its package.json or typings.

It's because you've provided an exports package.json field but it doesn't export the types file - should be a very small fix.

✔️ (7.22.7): https://arethetypeswrong.github.io/?p=%40bugsnag%2Felectron%407.22.7
❌ (7.23.0): https://arethetypeswrong.github.io/?p=%40bugsnag%2Felectron%407.23.0

EDIT: I just saw you've had a community PR to fix this since a year ago: #2184. You've published several versions since that submission - maybe it'd be worth merging it so TypeScript users can use them? (we're stuck on 7.22.7 until you fix this)

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