Issue when testing out SDK 3.0 in Node Js

Issue when testing out SDK 3.0 in Node Js

Hi,
I'm trying out the Node SDK (v3.0) and I implemented the test SDK script mentioned in the README here. I used file persistance and that part worked well. The initialization worked fine, where both the access and refresh tokens got fetched and saved in the file. But the getRecords part is throwing a strange error

  1. SDKException [Error]: TypeError: module.toLowerCase is not a function

        at Function.getFieldsInfo (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:306:25)

        at processTicksAndRejections (internal/process/task_queues.js:95:5)

        at async Function.getFields (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:141:9)

        at async RecordOperations.getRecords (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/core/com/zoho/crm/api/record/record_operations.js:161:3)

        at async Function.getRecords (/Users/rajath/dev/zoho-sdk-test/zoho_sdk_test.js:146:28) {

      code: null,

      cause: TypeError: module.toLowerCase is not a function

          at Function.setDataType (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:995:42)

          at Function.getFieldsDetails (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:562:39)

          at processTicksAndRejections (internal/process/task_queues.js:95:5)

          at async Function.fileExistsFlow (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:74:33)

          at async Function.getFieldsInfo (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:178:17)

          at async Function.getFields (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:141:9)

          at async RecordOperations.getRecords (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/core/com/zoho/crm/api/record/record_operations.js:161:3)

          at async Function.getRecords (/Users/rajath/dev/zoho-sdk-test/zoho_sdk_test.js:146:28),

      details: null

    }


Any idea what the issue could be? The same code works fine in V2.1 of the SDK!

The code I'm testing is from the documentation:

let moduleAPIName = "Leads";

//Get instance of RecordOperations Class
let recordOperations = new RecordOperations();

let paramInstance = new ParameterMap();

await paramInstance.add(GetRecordsParam.APPROVED, "both");

let headerInstance = new HeaderMap();

await headerInstance.add(GetRecordsHeader.IF_MODIFIED_SINCE, new Date("2021-01-01T00:00:00+05:30"));

//Call getRecords method that takes paramInstance, headerInstance and moduleAPIName as parameters
let response = await recordOperations.getRecords(moduleAPIName, paramInstance, headerInstance);

if (response != null) {
<rest of the code>