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

@aws-sdk/lib-storage File Upload is not working at [email protected] #3893

Open
eXpertise7 opened this issue Aug 22, 2024 · 2 comments
Open

Comments

@eXpertise7
Copy link

eXpertise7 commented Aug 22, 2024

The previous version in which this bug was not present was
Before migrating to the esbuild system. This feature works with webpack builder.

Description
I am trying to upload images to AWS but because of the Migrating to the new build system it is not working anymore.

Minimal Reproduction

import { Upload } from "@aws-sdk/lib-storage";
import { S3Client } from "@aws-sdk/client-s3";


  const parallelUploads3 = new Upload({
    client:  new S3Client({}),
    params: { Bucket, Key, Body },
  });
  parallelUploads3.on("httpUploadProgress", (progress) => {
    console.log(progress);
  });

parallelUploads3.done() .then(
                (data) => {
                   console.log(data)
                },
                (err: any) => {
                    console.log(err)
                },
            );
Exception or Error
TypeError: Cannot read properties of undefined (reading 'done')
    at getChunkStream.js:5:5
    at Generator.next (<anonymous>)
    at resume (chunk-CDW57LCT.js?v=b9e9dd30:100:27)
    at chunk-CDW57LCT.js?v=b9e9dd30:106:63
    at new ZoneAwarePromise (zone.js:1425:21)
    at it.<computed> [as next] (chunk-CDW57LCT.js?v=b9e9dd30:106:38)
    at Upload.<anonymous> (Upload.js:130:9)
    at Generator.next (<anonymous>)
    at chunk-CDW57LCT.js?v=b9e9dd30:90:61
    at new ZoneAwarePromise (zone.js:1425:21)

Source error preview:

image

Environment

Angular CLI: 17.3.8
Node: 18.13.0
Package Manager: npm 8.19.4
OS: darwin x64

Angular: 17.3.10
... animations, cdk, common, compiler, compiler-cli, core, forms
... material, material-moment-adapter, platform-browser
... platform-browser-dynamic, router

Package Version

"dependencies": {
"@angular/animations": "17.3.0",
"@angular/cdk": "17.2.2",
"@angular/common": "17.3.0",
"@angular/compiler": "17.3.0",
"@angular/core": "17.3.0",
"@angular/forms": "17.3.0",
"@angular/platform-browser": "17.3.0",
"@angular/platform-browser-dynamic": "17.3.0",
"@angular/router": "17.3.0",
"@aws-sdk/abort-controller": "^3.127.0",
"@aws-sdk/client-cognito-identity": "^3.150.0",
"@aws-sdk/client-s3": "^3.150.0",
"@aws-sdk/client-sts": "^3.150.0",
"@aws-sdk/lib-storage": "^3.150.0",
"typescript": "5.2.2"
"zone.js": "0.14.6",
...
},
devDependencies: {
"@angular-devkit/build-angular": "17.3.0",
"@angular-eslint/builder": "17.3.0",
"@angular-eslint/eslint-plugin": "17.3.0",
"@angular-eslint/eslint-plugin-template": "17.3.0",
"@angular-eslint/schematics": "17.3.0",
"@angular-eslint/template-parser": "16.1.1",
"@angular/cli": "17.3.0",
"@angular/compiler-cli": "17.3.0",
"@angular/language-service": "17.3.0",
"@aws-sdk/types": "^3.215.0",
"typescript": "5.2.2",
...
}


Helpful link can be found here: angular/angular-cli#27771 (comment).

@eXpertise7
Copy link
Author

@evanw If any further details are needed, I'm available to explain.

@markostojkov
Copy link

@evanw We are experiencing 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