I am not familiar with the JS/TS code. It should be a common issue. But I cannot find the answer....
I am writing the Azure Function Code in ts. Here is my tsconfig.json:
I tried to use azure-kusto-node in my source code:
import { Client, KustoConnectionStringBuilder } from "azure-kusto-data";
const kcsb = KustoConnectionStringBuilder.withSystemManagedIdentity(`https://${clusterName}.kusto.windows.net`);
const client = new Client(kcsb);
The error is
[2024-10-29T08:05:18.558Z] Worker was unable to load entry point "dist/src/functions/***.js": require() of ES Module ***\node_modules\azure-kusto-data\dist-esm\src\index.js from ***\dist\src\functions\****.js not supported.
Instead change the require of index.js in ****\dist\src\functions\****.js to a dynamic import() which is available in all CommonJS modules.
I am not familiar with the JS/TS code. It should be a common issue. But I cannot find the answer.... I am writing the Azure Function Code in ts. Here is my tsconfig.json:
I tried to use azure-kusto-node in my source code:
The error is
Any suggestion?