-
Notifications
You must be signed in to change notification settings - Fork 27
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
Webpack build warning #438
Comments
What exactly are you trying to build? Is this warning preventing you from useing this dependency? We have the browser samples working for aws-iot-device-sdk-js-v2 with webpack, so this should be working for you |
I get the same warning building with NextJS. FWIW the aws-crt still works this warning is just cluttering up the logs. |
I am able to work around this issue by suppressing the warning as described here. My updated next.config.js excerpt: const webpack = require("webpack");
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config) => {
config.plugins.push(
new webpack.ContextReplacementPlugin(/\/aws-crt\//, (data) => {
delete data.dependencies[0].critical;
return data;
})
);
return config;
},
};
module.exports = nextConfig; |
The native addon is loaded from a path computed dynamically based on the local host's architecture and OS properties. So on the surface this isn't something we can "fix." You can suppress the warning using the solution above. Another alternative is to use the browser distribution which does not need to load the native addon. In our browser samples, the redirection is found in the tsconfig: https://github.com/awslabs/aws-crt-nodejs/blob/main/samples/browser/http/tsconfig.json#L39-L41 The caveat about the browser implementation is that it does not contain Sigv4a support (AWS authentication that uses ECDSA signatures) |
Repeatedly seeing this warning:
I see a related PR that is closed, but as of latest release, still seeing the error. #220
I have
[email protected]
installed as a dependency of@aws-sdk/[email protected]
The text was updated successfully, but these errors were encountered: