Checkboxes for prior research
Describe the bug
Installing @aws-sdk/core or @aws-sdk/types tells TS that NodeJS globals are available, which can make TS ignore potential errors in browsers.
Related issue and more info, context: aws-amplify/amplify-js#11736
SDK version number
@aws-sdk/core@3.635.0
Which JavaScript Runtime is this issue in?
Browser
Details of the browser/Node.js/ReactNative version
Chrome: 128.0.6613.84
Reproduction Steps
https://stackblitz.com/edit/vitejs-vite-gmzgbg?file=src%2Fmain.ts
- Wait for
npm install to finish.
- Note that when hovering on
process.env, TS shows us that NodeJS globals are available.
- If you comment out the line that does
import '@aws-sdk/core';, the errors show up. They should show up either way, because I've specified "types": [], in tsconfig.json, so global types from @types/node should not be included, even though I've installed the @types/node package.
Observed Behavior
See aws-amplify/amplify-js#11736
Expected Behavior
See aws-amplify/amplify-js#11736
Possible Solution
No response
Additional Information/Context
No response
Checkboxes for prior research
Describe the bug
Installing
@aws-sdk/coreor@aws-sdk/typestells TS that NodeJS globals are available, which can make TS ignore potential errors in browsers.Related issue and more info, context: aws-amplify/amplify-js#11736
SDK version number
@aws-sdk/core@3.635.0
Which JavaScript Runtime is this issue in?
Browser
Details of the browser/Node.js/ReactNative version
Chrome: 128.0.6613.84
Reproduction Steps
https://stackblitz.com/edit/vitejs-vite-gmzgbg?file=src%2Fmain.ts
npm installto finish.process.env, TS shows us that NodeJS globals are available.import '@aws-sdk/core';, the errors show up. They should show up either way, because I've specified"types": [],intsconfig.json, so global types from@types/nodeshould not be included, even though I've installed the@types/nodepackage.Observed Behavior
See aws-amplify/amplify-js#11736
Expected Behavior
See aws-amplify/amplify-js#11736
Possible Solution
No response
Additional Information/Context
No response