【问题标题】:APACHE THRIFT ERROR: Uncaught TypeError: thrift.createConnection is not a function"APACHE THRIFT ERROR: Uncaught TypeError: thrift.createConnection is not a function\"
【发布时间】:2022-08-22 17:56:59
【问题描述】:

我在 Node JS、VS 代码上使用 Apache Thrift,但我不断收到“App.js:8 Uncaught TypeError: thrift.createConnection is not a function”。我使用命令 \"npm install thrift\" 但它似乎与函数 - \"createConnection\" 有一些链接错误。

我的代码(来自节俭教程)如下:

var thrift = require(\'thrift\');
var connection = thrift.createConnection(\"localhost\",9090,{\'protocol\': thrift.TBinaryProtocol, \'transport\': thrift.TBufferedTransport});
connection.on(\'error\',function (err)
{
   console.error(err);
 });

有谁知道它有什么问题?

    标签: node.js reactjs thrift


    【解决方案1】:

    我去,你解决这个问题了吗

    【讨论】:

      猜你喜欢
      • 2017-08-01
      • 2020-03-25
      • 1970-01-01
      • 1970-01-01
      • 2018-12-13
      • 1970-01-01
      • 2014-08-15
      • 2021-12-16
      • 2018-04-20
      相关资源
      最近更新 更多