Open dwnppoalt opened 6 days ago
The file @aws-sdk/client-s3/dist-cjs/endpoint/endpointResolver.js
exists in our distributed artifact, which can be verified by the code browser on https://www.npmjs.com/package/@aws-sdk/client-s3?activeTab=code. Did your build or deployment process omit it?
I don't think its in the build or install process. My project doesn't have a build command, and it only installs the dependencies through
npm install
Hi @dwnppoalt - this may be caused by a mismatch in the versions of the AWS SDK installed locally and on Vercel's deployment environment. What does your package.json
look like?
One suggestion would be to update @aws-sdk/client-s3 package to the latest version with npm install @aws-sdk/client-s3
. Please share your package.json
if issue persists.
@aBurmeseDev I installed the AWS SDK on my local machine using npm install @aws-sdk/client-s3@latest
. It installed version 3.682.0, which I used in my Vercel deployment.
This is my package.json
:
"name": "ins-api",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "node app.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"@aws-sdk/client-s3": "^3.682.0",
"@aws-sdk/s3-request-presigner": "^3.682.0",
"@aws-sdk/util-endpoints": "^3.679.0",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.21.1",
"jsonwebtoken": "^9.0.2",
"multer": "^1.4.5-lts.1",
"pg": "^8.13.1",
"uuid": "^11.0.2"
}
}
Checkboxes for prior research
Describe the bug
When deploying my project to Vercel, this error raises:
When I run it locally, it works fine.
Regression Issue
SDK version number
@aws-sdk/client-s3@^3.682.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.12.2
Reproduction Steps
N/A.
Observed Behavior
Expected Behavior
It should be imported normally.
Possible Solution
No response
Additional Information/Context
I import it to my
s3.js
file using: