You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on an open source project in OHIF (React, Node.js). After installing the aws-sdk/client-s3 package and initializing it in the project, I receive the following error message in the browser:
"Unexpected token 'export' in "export * from "./EventStreamCodec""
export * from "./EventStreamCodec";
export * from "./HeaderMarshaller";
export * from "./Int64";
export * from "./Message";
export * from "./MessageDecoderStream";
export * from "./MessageEncoderStream";
export * from "./SmithyMessageDecoderStream";
export * from "./SmithyMessageEncoderStream";*
I tried type module and various other solutions, such as * yarn add --dev @babel/plugin-transform-export-namespace-from*, but nothing helps!
How to fix this error?
SDK version number
"@aws-sdk/client-s3": "^3.533.0"
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
In my old version of OHIF everything ran fine when I installed the package. But in the new version it doesn’t work!
Possible Solution
I tried type module and various other solutions, such as * yarn add --dev @babel/plugin-transform-export-namespace-from*, but nothing helps!
Additional Information/Context
If you comment out the aws-sdk/client-s3 call, the rest of the application works without problems. But as soon as I divide the call, I immediately get an error in the browser.
The text was updated successfully, but these errors were encountered:
The error you are seeing is related to ES6 code that is not supported on a browser you are running. Since you mentioned React, are you using Webpack to bundle your application?
I tried type module and various other solutions, such as * yarn add --dev @babel/plugin-transform-export-namespace-from*, but nothing helps!
If you do have a Webpack config file, can you please share it with us?
RanVaknin
added
response-requested
Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.
p2
This is a standard priority issue
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Mar 15, 2024
Checkboxes for prior research
Describe the bug
I'm working on an open source project in OHIF (React, Node.js). After installing the aws-sdk/client-s3 package and initializing it in the project, I receive the following error message in the browser:
"Unexpected token 'export' in "export * from "./EventStreamCodec""
// "../../../node_modules/@smithy/eventstream-codec/dist-es/index.js":
/!!
! ../../../node_modules/@smithy/eventstream-codec/dist-es/index.js !
*/
/**/ (function(module, exports) {
export * from "./EventStreamCodec";
export * from "./HeaderMarshaller";
export * from "./Int64";
export * from "./Message";
export * from "./MessageDecoderStream";
export * from "./MessageEncoderStream";
export * from "./SmithyMessageDecoderStream";
export * from "./SmithyMessageEncoderStream";*
I tried type module and various other solutions, such as * yarn add --dev @babel/plugin-transform-export-namespace-from*, but nothing helps!
How to fix this error?
SDK version number
"@aws-sdk/client-s3": "^3.533.0"
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
node: v20.11.1, chrome 122.0.6261.129
Reproduction Steps
Using:
import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3';
const s3Client = new S3Client({ params...});
....
try {
const results = await s3Client.send(new PutObjectCommand(params));
} catch (err) {...}
Observed Behavior
And after run yarn run dev i get error in browser:
Uncaught SyntaxError: Unexpected token 'export' (at app.js:207575:1)
Expected Behavior
In my old version of OHIF everything ran fine when I installed the package. But in the new version it doesn’t work!
Possible Solution
I tried type module and various other solutions, such as * yarn add --dev @babel/plugin-transform-export-namespace-from*, but nothing helps!
Additional Information/Context
If you comment out the aws-sdk/client-s3 call, the rest of the application works without problems. But as soon as I divide the call, I immediately get an error in the browser.
The text was updated successfully, but these errors were encountered: