-
Notifications
You must be signed in to change notification settings - Fork 156
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
Critical dependency warning when bundling XRay SDK with webpack #103
Comments
@jhecking However, when I commented out that line, and also the dynamic require in |
Thanks for looking into this. It's good to know that the bundle size is not affected. However, the warning messages are quite annoying. The colors package has actually fixed the issue quite a while ago in Marak/colors.js#200. But it looks like you would have to update winston to v3.x in order to get the newer version and I think I saw some ticket about an incompatibility with that version? |
Incompatibility here: #48 Regardless, we should consider upgrading. |
Glad I found this issue here but does your X-Ray tracing work despite the warnings? I'm trying to run in Lambda with Webpack (typescript->JS) and while I see the same warnings it actually returns an error when I tried to execute: "errorMessage": "Cannot read property 'customizeRequests' of undefined",
"errorType": "TypeError", Usage: const AWSXRay = require('aws-xray-sdk-core')
import { DynamoDB } from 'aws-sdk';
const client: DynamoDB.DocumentClient = new DynamoDB.DocumentClient();
// for the lack of types
AWSXRay.captureAWSClient((DynamoDB.DocumentClient as any).service); |
Nvm, managed to get it working now regardless of this warning, answer here in case anyone finds themselves in the same situation in the future: const AWSXRay = require('aws-xray-sdk-core')
import { DocumentClient } from 'aws-sdk/clients/dynamodb';
let client: DocumentClient;
client = new DocumentClient();
AWSXRay.captureAWSClient((client as any).service); |
Hello, Is there an ETA to fix this? I'm looking at https://github.com/aws/aws-xray-sdk-node/blob/master/packages/core/CHANGELOG.md and I noticed that v2.4.0 was meant to fix this but I'm still seeing the issue on v.2.5.0. #190 appears to have been 'merged' but it's unclear when it will be released? Thanks. |
Hi @theshumanator, |
The 3.0.0-alpha.1 is now released. |
Since adding aws-xray-sdk-core to my package dependencies, I'm getting the following warnings when bundling my package using webpack:
Webpack tries to resolve require calls statically to make a minimal bundle. When a library uses variables in a require call (such as this line in aws-xrad-sdk-core), Webpack cannot resolve them statically and imports the entire package.
I'm using v2.2.0 of the SDK.
The text was updated successfully, but these errors were encountered: