-
Notifications
You must be signed in to change notification settings - Fork 652
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
RollupError: "SmithyRpcV2CborProtocol" is not exported by "../../node_modules/.pnpm/@aws-sdk+core@3.946.0/node_modules/@smithy/core/cbor.d.ts", imported by "../../node_modules/.pnpm/@aws-sdk+core@3.946.0/node_modules/@aws-sdk/core/dist-types/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.d.ts".
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
"@aws-sdk/client-quicksight": "3.946.0",
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v22.16.0
Reproduction Steps
Install as a dev dep!
"@aws-sdk/client-quicksight": "3.946.0",
Use in a file:
import type { QuickSight } from '@aws-sdk/client-quicksight'
Use the following tsup config:
{
"clean": true,
"sourcemap": true,
"watch": false,
"silent": true,
"entry": [
"src/index.ts"
],
"dts": {
"resolve": true
},
"tsconfig": "tsconfig.build.json",
"outDir": "lib",
"format": [
"cjs",
"esm"
],
"shims": true,
"target": "node22.16.0"
}
build:
tsup
Observed Behavior
Explodes with error:
RollupError: "SmithyRpcV2CborProtocol" is not exported by "../../node_modules/.pnpm/@aws-sdk+core@3.946.0/node_modules/@smithy/core/cbor.d.ts", imported by "../../node_modules/.pnpm/@aws-sdk+core@3.946.0/node_modules/@aws-sdk/core/dist-types/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.d.ts".
Expected Behavior
Not explode.
Possible Solution
Export SmithyRpcV2CborProtocol
Additional Information/Context
I've created a minimal reproduction repository:
https://github.com/moltar/aws-sdk-issue-7567
Steps to reproduce:
- Clone the repo
pnpm installpnpm build
The build will fail with:
RollupError: "SmithyRpcV2CborProtocol" is not exported by "node_modules/.pnpm/@aws-sdk+core@3.946.0/node_modules/@smithy/core/cbor.d.ts"
Key requirement: the SDK package must be a devDependency so that tsup attempts to bundle the types (with dts.resolve: true).