Skip to content

Rpcv2cbor: Cannot find name '_'. Errors with BigDecimal #1511

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

Open
zchenpds opened this issue Jan 23, 2025 · 2 comments
Open

Rpcv2cbor: Cannot find name '_'. Errors with BigDecimal #1511

zchenpds opened this issue Jan 23, 2025 · 2 comments
Assignees

Comments

@zchenpds
Copy link

Ran into the following error with BigDecimal attributes in the Smithy structures.

     [exec] [build:cjs] src/protocols/Rpcv2cbor.ts(432,27): error TS2304: Cannot find name '_'.
     [exec] [build:cjs] src/protocols/Rpcv2cbor.ts(433,26): error TS2304: Cannot find name '_'.
     [exec] [build:cjs] src/protocols/Rpcv2cbor.ts(436,27): error TS2304: Cannot find name '_'.
     [exec] [build:cjs] src/protocols/Rpcv2cbor.ts(452,24): error TS2304: Cannot find name '_'.
     [exec] [build:cjs] src/protocols/Rpcv2cbor.ts(517,24): error TS2304: Cannot find name '_'.
     [exec] [build:cjs] npm run build:cjs exited with code 2
     [exec] [build:es] src/protocols/Rpcv2cbor.ts(432,27): error TS2304: Cannot find name '_'.
     [exec] [build:es] src/protocols/Rpcv2cbor.ts(433,26): error TS2304: Cannot find name '_'.
     [exec] [build:es] src/protocols/Rpcv2cbor.ts(436,27): error TS2304: Cannot find name '_'.
     [exec] [build:es] src/protocols/Rpcv2cbor.ts(452,24): error TS2304: Cannot find name '_'.
     [exec] [build:es] src/protocols/Rpcv2cbor.ts(517,24): error TS2304: Cannot find name '_'.
     [exec] [build:es] npm run build:es exited with code 2
     [exec] [build:types] src/protocols/Rpcv2cbor.ts(432,27): error TS2304: Cannot find name '_'.
     [exec] [build:types] src/protocols/Rpcv2cbor.ts(433,26): error TS2304: Cannot find name '_'.
     [exec] [build:types] src/protocols/Rpcv2cbor.ts(436,27): error TS2304: Cannot find name '_'.
     [exec] [build:types] src/protocols/Rpcv2cbor.ts(452,24): error TS2304: Cannot find name '_'.
     [exec] [build:types] src/protocols/Rpcv2cbor.ts(517,24): error TS2304: Cannot find name '_'.
     [exec] [build:types] npm run build:types exited with code 1

Checking the generated code, seeing something like _.toJSON in Rpcv2cbor.ts

  const se_Adjustment = (
    input: Adjustment,
    context: __SerdeContext
  ): any => {
    return take(input, {
      'activeBenefitCount': [],
      'adjustmentAmount': _.toJSON,
@zchenpds zchenpds changed the title Cannot find name '_'. Errors with BigDecimal Rpcv2cbor: Cannot find name '_'. Errors with BigDecimal Jan 23, 2025
@kuhe kuhe self-assigned this Feb 24, 2025
@kuhe
Copy link
Contributor

kuhe commented Mar 13, 2025

This is a bug, however bigDecimal is currently not supported in the CBOR protocol.

@smeyffret
Copy link

Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants