Hello Everyone,
While using the Elastic Search Library with TypeScript in Svelte giving unknown TypeError:
import { Client } from "@elastic/elasticsearch";
import * as fs from "fs";
const client = new Client({
node: "https://localhost:9200",
auth: {
username: "elastic",
password: "<Password>",
},
tls: {
ca: fs.readFileSync("./src/lib/http_ca.crt", "utf-8"),
rejectUnauthorized: false,
},
});
This error is occuring while using Elasticsearch library in TypeScript.