{"id":49630,"library":"vald-client-node","title":"Vald Client Node.js","description":"A Node.js gRPC client library (v1.7.17) for Vald, an AI-powered vector similarity search engine. This client enables inserting, updating, searching, and removing vectors via gRPC with support for both CommonJS and ESM. It ships TypeScript types and targets Node.js >=18.16.0. Compared to other vector database clients, it is optimized for Vald's cloud-native architecture and offers auto-indexing and distributed search capabilities.","status":"active","version":"1.7.17","language":"javascript","source_language":"en","source_url":"https://github.com/vdaas/vald-client-node","tags":["javascript","vald","typescript"],"install":[{"cmd":"npm install vald-client-node","lang":"bash","label":"npm"},{"cmd":"yarn add vald-client-node","lang":"bash","label":"yarn"},{"cmd":"pnpm add vald-client-node","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for gRPC communication with Vald server","package":"@grpc/grpc-js","optional":false},{"reason":"Used for Protocol Buffers serialization","package":"google-protobuf","optional":false}],"imports":[{"note":"ESM or CommonJS both work; named export.","wrong":"const ValdClient = require('vald-client-node').ValdClient","symbol":"ValdClient","correct":"import { ValdClient } from 'vald-client-node'"},{"note":"Protobuf message type, also exported.","wrong":"const InsertRequest = require('vald-client-node').InsertRequest","symbol":"InsertRequest","correct":"import { InsertRequest } from 'vald-client-node'"},{"note":"Default export is the package itself, not a class.","wrong":"import DefaultRPCClient from 'vald-client-node'","symbol":"DefaultRPCClient","correct":"import { DefaultRPCClient } from 'vald-client-node'"}],"quickstart":{"code":"import { ValdClient } from 'vald-client-node';\nimport { InsertRequest, Object, SearchRequest } from 'vald-client-node';\n\nconst client = new ValdClient('localhost:8080', grpc.credentials.createInsecure());\n\nconst insertReq = new InsertRequest({\n  vector: new Object({ id: 'vec1', floatVector: { vector: [0.1, 0.2, 0.3] } })\n});\n\nclient.insert(insertReq, (err, response) => {\n  if (err) console.error(err);\n  else console.log('Inserted:', response);\n});\n\nconst searchReq = new SearchRequest({\n  vector: [0.1, 0.2, 0.3],\n  config: { num: 10 }\n});\n\nclient.search(searchReq, (err, response) => {\n  if (err) console.error(err);\n  else console.log('Results:', response.results);\n});","lang":"typescript","description":"Demonstrates how to instantiate a ValdClient, insert a vector, and perform a similarity search."},"warnings":[{"fix":"Update constructor call to include credentials as second argument.","message":"In v1.0.0, the client constructor changed from (address, options) to (address, credentials, options).","severity":"breaking","affected_versions":">=1.0.0 <1.7.0"},{"fix":"Use SearchRequest.vectorObject for new projects.","message":"SearchRequest.vector field is deprecated in favor of SearchRequest.vectorObject.","severity":"deprecated","affected_versions":">=1.7.0"},{"fix":"Set a deadline on the gRPC call options, e.g., { deadline: new Date(Date.now() + 5000) }.","message":"gRPC deadline is not set by default; long-running calls may hang indefinitely.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure you set the correct field based on vector type: floatVector vs binaryVector.","message":"The Vector message uses float_vector for floats and binary_vector for bytes; mixing them causes serialization errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Replace with IndexInfoRequest and IndexInfoResponse.","message":"CreateIndexRequest and CreateIndexResponse are deprecated; use IndexInfoRequest/Response instead.","severity":"deprecated","affected_versions":">=1.7.0"}],"env_vars":null,"search_vec":"'18.16.0':45 'ai':14 'ai-pow':13 'architectur':61 'auto':65 'auto-index':64 'capabl':70 'client':2,7,21,51 'cloud':59 'cloud-nat':58 'commonj':35 'compar':46 'databas':50 'distribut':68 'enabl':22 'engin':19 'esm':37 'grpc':6,30 'index':66 'insert':23 'javascript':71 'librari':8 'nativ':60 'node.js':3,5,44 'offer':63 'optim':54 'power':15 'remov':27 'search':18,25,69 'ship':39 'similar':17 'support':32 'target':43 'type':41 'typescript':40,73 'updat':24 'v1.7.17':9 'vald':1,11,56,72 'vector':16,28,49 'via':29","created_at":"2026-06-07T17:02:46.286605+00:00","updated_at":"2026-06-07T17:02:46.286605+00:00","problems":[{"fix":"Upgrade Vald server to v1.7 or later, or check the server's available methods.","cause":"Outdated Vald server version that doesn't support the Insert RPC.","error":"Error: 12 UNIMPLEMENTED: Method not found: vald.v1.Insert/Insert"},{"fix":"Use: const client = new ValdClient(...);","cause":"Missing 'new' keyword when instantiating ValdClient in ESM.","error":"TypeError: Class constructor ValdClient cannot be invoked without 'new'"},{"fix":"Pass metadata as a plain object: { key: 'value' }.","cause":"Passing an array of metadata entries where an object is expected.","error":"Error: Metadata expected as object, got array"},{"fix":"Ensure Vald server is running and accessible at the given host:port.","cause":"Vald server not running or wrong address/port.","error":"Error: Failed to connect to remote host: connection refused"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/vdaas/vald-client-node","github":"https://github.com/vdaas/vald-client-node","docs":null,"changelog":null,"pypi":null,"npm":"vald-client-node","openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}