Could not resolve "@aws-sdk/client-s3"
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- aws, javascript, node.js
- Domain
- backend, build-system
Research direction
Start by locating the package manifest entries for the @aws-sdk/client-s3 peerDependency and devDependency, then compare them with the matching @aws-sdk/s3-request-presigner versions. Update the client-s3 peer range to match the tested dependency and run the npm build that currently fails; done means the dependency declarations are consistent and the build resolves the package.
Written by the indexing model from the issue text.
Description
Issue
@aws-sdk/client-s3 peerDependency range out of sync with devDependency
Our team encountered this error after bumping lambda-api to the latest version. The same issue did not occur with @aws-sdk/s3-request-presigner, which has consistent versions across peer and dev dependencies.
✘ [ERROR] Could not resolve "@aws-sdk/client-s3"
../node_modules/lambda-api/dist/esm/lib/s3-service.js:19:42:
19 │ const { S3Client } = await import('@aws-sdk/client-s3');
╵ ~~~~~~~~~~~~~~~~~~~~
You can mark the path "@aws-sdk/client-s3" as external to exclude it from the bundle, which will
remove this error and leave the unresolved path in the bundle. You can also add ".catch()" here to
handle this failure at run-time instead of bundle-time.
1 error
npm error Lifecycle script `build` failed with error:
npm error code 1
npm error path /Users/aichi.chang/krakenflex/schedules/schedules-api
npm error workspace schedules-api@1.0.0
npm error location /Users/aichi.chang/krakenflex/schedules/schedules-api
npm error command failed
peerDependencies declares @aws-sdk/client-s3: "^3.470.0" but devDependencies pins 3.1106.0. Since the library is developed and tested against 3.1106.0, consumers constrained to ^3.470.0 may hit runtime or build failures. @aws-sdk/s3-request-presigner is at 3.470.0 in both — which is why only client-s3 is affected.
Would it be possible to bump the @aws-sdk/client-s3 peerDependency to "^3.1106.0"?
Environment
npm: 10
node: 22
Workaround
We made @aws-sdk/client-s3 as an external package in the build command resolves the error, but feels like a workaround rather than a proper fix.
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 127
- Avg merge
- 31m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jeremydaly/lambda-api
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
jeremydaly/lambda-api#270 ·
-
Logger Output Open
jeremydaly/lambda-api#259 · 1 comment · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
jeremydaly/lambda-api#257 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
jeremydaly/lambda-api#251 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
jeremydaly/lambda-api#245 · 2 comments ·
All issues in jeremydaly/lambda-api
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·