I'm getting this error on a very basic Client implementation of @modelcontextprotocol/sdk on node 20 and 22.
Reproduction script:
import{Client}from'@modelcontextprotocol/sdk/client';import{StdioClientTransport}from'@modelcontextprotocol/sdk/client/stdio';import{ListResourcesResultSchema}from'@modelcontextprotocol/sdk/types';construn=async()=>{consttransport=newStdioClientTransport({command: 'npx @modelcontextprotocol/postgres-server postgres://....',});constclient=newClient({name: 'example-client',version: '1.0.0',},{capabilities: {}});awaitclient.connect(transport);constresources=awaitclient.request({method: 'resources/list'},ListResourcesResultSchema);console.log(resources);};run();Is this a known issue? Any thoughts on how to get this example working?
I'm getting this error on a very basic Client implementation of
@modelcontextprotocol/sdkon node 20 and 22.Reproduction script:
Is this a known issue? Any thoughts on how to get this example working?