Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependancy request warnings in webpack #114

Open
BLWood opened this issue Apr 7, 2022 · 1 comment
Open

Dependancy request warnings in webpack #114

BLWood opened this issue Apr 7, 2022 · 1 comment

Comments

@BLWood
Copy link

BLWood commented Apr 7, 2022

We pull in diagnostic-channel-publishers via applicationinsights. Since applicationinsights 2.3.0 (with diagnostic-channel-publishers 1.0.5) we have been getting the following warnings when running webpack:

WARNING in ./node_modules/diagnostic-channel-publishers/dist/src/azure-coretracing.pub.js 77:37-78
Module not found: Error: Can't resolve '@opentelemetry/instrumentation' in '***/node_modules/diagnostic-channel-publishers/dist/src'
 @ ./node_modules/diagnostic-channel-publishers/dist/src/index.js 6:15-49
 @ ./node_modules/applicationinsights/out/AutoCollection/diagnostic-channel/initialization.js 11:21-61
 @ ./node_modules/applicationinsights/out/AutoCollection/CorrelationContextManager.js 5:18-64
 @ ./node_modules/applicationinsights/out/applicationinsights.js 4:32-85

WARNING in ./node_modules/diagnostic-channel-publishers/dist/src/azure-coretracing.pub.js 78:32-89
Module not found: Error: Can't resolve '@azure/opentelemetry-instrumentation-azure-sdk' in '***/node_modules/diagnostic-channel-publishers/dist/src'
 @ ./node_modules/diagnostic-channel-publishers/dist/src/index.js 6:15-49
 @ ./node_modules/applicationinsights/out/AutoCollection/diagnostic-channel/initialization.js 11:21-61
 @ ./node_modules/applicationinsights/out/AutoCollection/CorrelationContextManager.js 5:18-64
 @ ./node_modules/applicationinsights/out/applicationinsights.js 4:32-85

When manually adding @opentelemetry/instrumentation and @azure/opentelemetry-instrumentation-azure-sdk we just get the following warning:

WARNING in ./node_modules/@opentelemetry/instrumentation/build/esm/platform/node/instrumentation.js 63:26-69
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/@opentelemetry/instrumentation/build/esm/platform/node/index.js 16:0-34 16:0-34
 @ ./node_modules/@opentelemetry/instrumentation/build/esm/platform/index.js 16:0-23 16:0-23
 @ ./node_modules/@opentelemetry/instrumentation/build/esm/index.js 17:0-33 17:0-33
 @ ./node_modules/diagnostic-channel-publishers/dist/src/azure-coretracing.pub.js 77:37-78
 @ ./node_modules/diagnostic-channel-publishers/dist/src/index.js 6:15-49
 @ ./node_modules/applicationinsights/out/AutoCollection/diagnostic-channel/initialization.js 11:21-61
 @ ./node_modules/applicationinsights/out/AutoCollection/CorrelationContextManager.js 5:18-64
 @ ./node_modules/applicationinsights/out/applicationinsights.js 4:32-85

We believe this is to do with the conditional require inside azure-coretracing.pub.ts introduced here.

@veronicapetersen
Copy link

Did you get this resolved? We are seeing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants