Skip to content

[Bug] Project dist entry points missing/unaligned since 11.9.0 #930

Closed
@tomwanzek

Description

@tomwanzek

Steps to Reproduce the Problem

  • Upgrade a typescript-based project to use Instabug RN to 11.9.0

Expected Behavior

  • Project can be compiled with typescript compiler finding the instabug modules/exports

Actual Behavior

  • Compilation fails to compile because of:

Cannot find module 'instabug-reactnative' or its corresponding type declarations.

The issue manifests, it appears, as the instabug-reactnative version 11.9.0 package.json contains:

"main": "dist/index",
"types": "dist/index.d.ts"

However, the dist directory actually does not contain these entry points. Instead, they are found under dist/src/... and the

/dist directory also includes a subdirectory /tests, which is likely unintentional

In short, it seems, the build -> distribution pipeline is misaligned in terms of what gets moved to /dist and where.

By implication, we used to have an import of

import type { NetworkData } from "instabug-reactnative/dist/utils/XhrNetworkInterceptor";

which is broken for the same reason.

Preferably, we should be able to import type { NetworkData } from "instabug-reactnative" to begin with. I.e. there should be re-exports to the top-level index file, so it can be used more "offically" in network obfuscator logic.

Instabug integration code

Not needed, see explanation under "Expected Behavior"

SDK Version

Issue introduced with version 11.9.0.

React Native, iOS and Android Versions

Affects react native level irrespective of native versions

Device Model

n/a

[Optional] Project That Reproduces the Issue

Metadata

Metadata

Assignees

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