Skip to content

[BUG] ReactNativeManualDevicePlugin - Cannot find module @microsoft/applicationinsights-react-native/dist-esm/manualIndex #46

@yoannHertienne

Description

@yoannHertienne

Description/Screenshot

Following your documentation, I'm using Expo, so I import ReactNativeManualDevicePlugin using
import { ReactNativeManualDevicePlugin } from "@microsoft/applicationinsights-react-native/dist-esm/manualIndex"

but then I'm getting the following Typescript error
image
image

Steps to Reproduce

  • OS/Browser: MacOS
  • React-Native Version: 0.73.6
  • SDK Version [e.g. 22]:
    "@microsoft/applicationinsights-react-native": "^4.1.1",
    "@microsoft/applicationinsights-web": "^3.2.0",
  • How you initialized the SDK:
    `import { ApplicationInsights, IApplicationInsights } from "@microsoft/applicationinsights-web"
    import { ReactNativeManualDevicePlugin } from "@microsoft/applicationinsights-react-native/dist-esm/manualIndex"
    import { myDeviceInfoModule } from "../../config/appInsight-device.ts"

// MS ApplicationInsights
const RNMPlugin = new ReactNativeManualDevicePlugin()
RNMPlugin.setDeviceInfoModule(myDeviceInfoModule)
const appInsight = new ApplicationInsights({
config: {
connectionString: Config.APPINSIGHT_CONNECTION_STRING,
extensions: [RNMPlugin],
},
})
appInsight.loadAppInsights()`

Expected behavior

Typescript should detect the module. I have the same issue with my Unit Test using Jest

Additional context
Add any other context about the problem here.

Metadata

Metadata

Labels

investigation requiredFurther investigation or discussions requiredkeepDo not Mark as Stale and close

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions