Skip to content

TextDecoder.decode() fails on Node.js 22 #883

@MarcSigot3B

Description

@MarcSigot3B

When using the SDK on AWS Lambda with Node.js 22, the following error occurs:

Calling the invoke API action failed with this message: Failed to execute 'decode' on 'TextDecoder': parameter 1 is not of type 'ArrayBuffer'

Node.js version: 22
Runtime: AWS Lambda
SDK version: 0.71.2
Package: @anthropic-ai/sdk

Workaround : downgrade the Lambda runtime to Node.js 20.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions