-
Notifications
You must be signed in to change notification settings - Fork 698
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
🐛 BUG: global is not defined while using aws-sdk #3627
Comments
Hey! 👋 Apologies for the delayed response? Does adding |
hi @Codename-404 :) we haven’t heard back so we will close the issue for now. however, if this is still an issue and @mrbbot 's suggestion doesn't fix it, please feel free to re-open it. thanks! |
Hi I have the same problem and adding What's worse is
|
Hey @alex-h-strachan! You should be able to use the |
Which Cloudflare product(s) does this pertain to?
Workers Runtime, Wrangler core
What version(s) of the tool(s) are you using?
"wrangler": "^3.0.0", "aws-sdk": "^2.1416.0"
What version of Node are you using?
v18.16.0
What operating system are you using?
Mac
Describe the Bug
I get the following error when I try to deploy the code to worker from my local environment. This issue only occurs when using 'aws-sdk'
Uncaught ReferenceError: global is not defined
at worker.js:12285:35 in node_modules/aws-sdk/node_modules/buffer/index.js
at worker.js:3:50 in __require
at worker.js:13745:19 in node_modules/aws-sdk/lib/browserHashUtils.js
at worker.js:3:50 in __require
at worker.js:13788:21 in node_modules/aws-sdk/lib/browserHmac.js
at worker.js:3:50 in __require
at worker.js:14303:16 in node_modules/aws-sdk/lib/browserCryptoLib.js
at worker.js:3:50 in __require
at worker.js:17600:23 in node_modules/aws-sdk/lib/browser_loader.js
at worker.js:3:50 in __require
[code: 10021]
Please provide a link to a minimal reproduction
It's happening just by installing aws-sdk and importing it. "aws-sdk": "^2.1416.0". Even if it's a hello world project. Just install and import aws-sdk to index.js or wrangler.js. And once you try to deploy, it fails with these errors
Please provide any relevant error logs
Uncaught ReferenceError: global is not defined
at worker.js:12285:35 in node_modules/aws-sdk/node_modules/buffer/index.js
at worker.js:3:50 in __require
at worker.js:13745:19 in node_modules/aws-sdk/lib/browserHashUtils.js
at worker.js:3:50 in __require
at worker.js:13788:21 in node_modules/aws-sdk/lib/browserHmac.js
at worker.js:3:50 in __require
at worker.js:14303:16 in node_modules/aws-sdk/lib/browserCryptoLib.js
at worker.js:3:50 in __require
at worker.js:17600:23 in node_modules/aws-sdk/lib/browser_loader.js
at worker.js:3:50 in __require
[code: 10021]
The text was updated successfully, but these errors were encountered: