var platform=new PlatformJS给出构造函数错误

var platform = new PlatformJS gives a constructor error

本文关键字:构造函数 错误 PlatformJS platform new var      更新时间:2023-09-26

我目前正在构建一个集成PODIO api的web应用程序。

下面是一个代码:

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

返回以下错误:

无法读取未定义捆绑包的属性"call"。js:23688

我使用browserfy将我的main.js转换为bundle.js,但我不明白为什么会发生这种情况。

任何帮助都将不胜感激。

您正在尝试实例化一个新的PlatformJS对象,而不是一个Podio对象。请参阅自述文件中的示例[1]。

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