-
Notifications
You must be signed in to change notification settings - Fork 599
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
Unable to resolve module events in @aws-sdk/lib-storage #2156
Comments
Hey @jereztech, thanks for opening this issue, can you please follow the issue template? I am looking for more information on how to reproduce this. Thankyou |
Hi @ajredniwja, thanks for reply. Bug Description: Environment: Minimal Repo: Using expo init lib-storage-demo, just add the fallowing to package.json and then npm install Error: Unable to resolve module events from /Users/.../.../.../node_modules/@aws-sdk/lib-storage/dist/cjs/Upload.js: events could not be found within the project. I'm following the official documentation: https://www.npmjs.com/package/@aws-sdk/lib-storage My minimal code: import { CognitoIdentityClient } from "@aws-sdk/client-cognito-identity";
import { fromCognitoIdentityPool } from "@aws-sdk/credential-provider-cognito-identity";
import { Upload } from "@aws-sdk/lib-storage";
import {
S3Client,
} from "@aws-sdk/client-s3";
const REGION = "us-east-2";
const s3Client = new S3Client({
region: REGION,
credentials: fromCognitoIdentityPool({
client: new CognitoIdentityClient({ region: REGION }),
identityPoolId: "IDENTITY_ID",
}),
});
export const uploadFile = async (bucketName, key, file, onProgressFn, onResponseFn) => {
try {
const paralellUploads3 = new Upload({
client: s3Client,
params: { Bucket: bucketName, Key: key, Body: file },
});
paralellUploads3.on("httpUploadProgress", (progress) => {
console.log(progress);
onProgressFn && onProgressFn(progress)
});
return await paralellUploads3.done();
} catch (e) {
console.log(e);
}
} Importing Upload from @aws-sdk/lib-storage crashes the application. |
Fixed in #2165, to be published with the next release expected on 3/25 or 3/26. |
could someone confirm please if it'll be released today? @trivikr ? |
Yes. The fix will be released today with |
@trivikr thank you! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Unable to resolve module events in @aws-sdk/lib-storage/dist/cjs/Upload.js
"@aws-sdk/client-s3": "^3.9.0",
"@aws-sdk/lib-storage": "^3.9.0",
"react": "17.0.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
The text was updated successfully, but these errors were encountered: