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.
Issue
@aws-sdk/client-s3peerDependency range out of sync with devDependencyOur team encountered this error after bumping
lambda-apito the latest version. The same issue did not occur with@aws-sdk/s3-request-presigner, which has consistent versions across peer and dev dependencies.peerDependencies declares
@aws-sdk/client-s3: "^3.470.0"butdevDependencies 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-presigneris at 3.470.0 in both — which is why only client-s3 is affected.Would it be possible to bump the
@aws-sdk/client-s3peerDependency to"^3.1106.0"?Environment
npm: 10
node: 22
Workaround
We made
@aws-sdk/client-s3as an external package in the build command resolves the error, but feels like a workaround rather than a proper fix.