格子连接到节点错误的客户端

plaid connect to client with node error

我正在使用节点后端并尝试连接到 plaid。 我的代码:

var plaid = require('plaid');

var clientID = "bla";
var secretID = "bla";
var publicKey = "bla";

var client = new plaid.Client(
    clientID,
    secretID,
    publicKey,
    plaid.environments.sandbox

);

但是我在控制台中收到此错误:

    throw new Error('Invalid Plaid environment');
    ^

Error: Invalid Plaid environment
    at new Plaid.Client (C:\Users\me\Documents\found\SPA\node_modules\plaid\index.js:26:11)
    at module.exports (C:\Users\me\Documents\found\SPA\app\routes.js:48:22)
    at Object.<anonymous> (C:\Users\me\Documents\found\SPA\server.js:48:24)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)

我尝试过使用其中的每一个,但没有成功:

plaid.environments.sandbox
plaid.environments.development 
plaid.environments.tartan

怎么回事?

参考:https://plaid.com/docs/quickstart/#accessing-item-data

更新: 我已将下面的代码用于我的应用程序的另一部分:

var plaidClient = new plaid.Client(clientID, secretID, plaid.environments.tartan);

但是我正在尝试使用 client.getTransactions() 并且需要 var plaidClient = new plaid.Client(clientID, secretID, publicID, plaid.environments.sandbox); 为了 client.getTransactions() 工作。

更新?

出于某种原因,我安装了错误版本的格子呢。我需要卸载并重新安装才能修复。现在工作。