Closed mohammed-elrais closed 2 weeks ago
Hello, having the exact same issue here with angular version 17 Any investigations undergoing ?
hello, how is it going?
@alan-agius4 Confirmed. This is actual issue. I think it's a critical priority.
@mohammed-elrais @cpt-cyrilcomor @kloc823 Has anyone of you made issue request at @aws-sdk? I can't find it.
hi @eXpertise7, i didn't raise issue to aws since aws-sdk v3/v2 work good in my other (angular/react) projects
I have looked into the issue and it appears to be caused by esbuild, as I was able to replicate the problem using the Angular CLI.
index.js
import { Upload } from "@aws-sdk/lib-storage";
import { S3Client } from "@aws-sdk/client-s3";
const text = "This is some sample text to stream.";
const readableStream = new ReadableStream({
start(controller) {
controller.enqueue(new TextEncoder().encode(text));
controller.close();
},
});
const parallelUploads3 = new Upload({
client: new S3Client({}),
params: { Body: readableStream },
});
parallelUploads3.on("httpUploadProgress", (progress) => {
console.log(progress);
});
parallelUploads3.done().then(
(data) => {
console.log(data);
},
(err) => {
console.log(err);
}
);
esbuild.config.js
export default {
platform: 'browser',
bundle: true,
entryPoints: ['./index.js'],
supported: {
'async-await': false,
},
}
Commands
$ esbuild > output.js
$ node output.js
Cannot read properties of undefined (reading 'done')
at output.js:16472:123
at Generator.next (<anonymous>)
at resume (output.js:56:31)
at output.js:61:67
at new Promise (<anonymous>)
at it.<computed> [as next] (output.js:61:42)
at Upload.<anonymous> (output.js:16728:97)
at Generator.next (<anonymous>)
at output.js:46:63
at new Promise (<anonymous>)
Based on this, there is nothing actionable from our end at this point. This seems to be an issue with esbuild rather than Angular.
Command
build, serve
Is this a regression?
The previous version in which this bug was not present was
Before Migrating to the new build system
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
Exception or Error
Your Environment
Anything else relevant?