Adjoa Wadee
Adjoa Wadee

Reputation: 109

var platform = new PlatformJS gives a constructor error

I am currently working on building a web application that intergrates PODIO api's.

below is a code:

    var PlatformJS = require('PlatformJS');
var Podio = require('podio-js');

var podio = new PlatformJS({
    authType: 'server',
    clientId: 'test',
    clientSecret: 'somesecret'
});

that returns the following error:

Cannot read property 'call' of undefined bundle.js:23688

I use browserify to convert my main.js to bundle.js and I cannot figure out why this is happening.

Any help will be appreciated.

Upvotes: 0

Views: 108

Answers (1)

Chris Peters - Podio
Chris Peters - Podio

Reputation: 419

You are trying to instantiate a new PlatformJS object and not a Podio object. See the example [1] in the readme.

[1] https://github.com/podio/podio-js#node

Upvotes: 2

Related Questions