Creating records with Node.js SDK 2.0 createRecords()

Creating records with Node.js SDK 2.0 createRecords()

Hi! I'm making a customer portal application with Node.js and using the Zoho Node JS SDK searchRecords() to get records data to my application and that works just fine. Now I am trying to create a record with createRecords() but can't seem to get it working. The error message I am getting is: 

UnhandledPromiseRejectionWarning: Error: TypeError: Cannot read property 'getResourcePath' of undefined
    at Function.getFieldsInfo (/node_modules/@zohocrm/nodejs-sdk-2.0/utils/util/utility.js:271:25)

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

    at async Function.getFields (/node_modules/@zohocrm/nodejs-sdk-2.0/utils/util/utility.js:130:9)

    at async RecordOperations.createRecords (/node_modules/@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/record/record_operations.js:197:3)

    at async Function.createRecords (/index.js:368:24)

What I understand from the error is that the getResourcePath can't resolve my resourcePath. I have no idea why this is.

I have initialized my connection with the sample code from https://www.zoho.com/crm/developer/docs/nodejs-sdk/v2/initialize.html and my InitializerBuilder looks like this: 
try { 
    (await new InitializeBuilder())
        .user(user)
        .environment(environment)
        .token(token)
        .store(tokenStore)
        .SDKConfig(sdkConfig)
        .resourcePath(resourcePath)
        .logger(logger)
        .initialize();
    }catch (error) {
        console.log(error);
    }
    console.log("Init successful");
}

Has anyone had this problem and found a way to resolve it?