【问题标题】:SMB-Get Nodejs getaddrinfo ENOTFOUNDSMB-获取 Nodejs getaddrinfo ENOTFOUND
【发布时间】:2016-03-08 15:33:02
【问题描述】:

我目前正在尝试从 Debian 机器连接到 SMB 服务器。我已经从 https://github.com/bchelli/node-smb2 下载了 SMB2-Client,我已经完成了示例

var SMB2 = require('smb2');

// create an SMB2 instance
var smb2Client = new SMB2({
  share:'\\\\xxx/appfolder/\\'
, domain:'xxx'
, username:'teste'
, password:'teste'
});


smb2Client.exists('/Base_dados.mdb', function (err, exists) {
    if (err) throw err;
    console.log(exists ? "it's there" : "it's not there!");
});

我得到了当前的错误

  /home/sergio/Desktop/node-access/index.js:14
    if (err) throw err;
                   ^

如果有人对如何解决这个问题有任何想法,将不胜感激。

问候。

【问题讨论】:

    标签: javascript node.js ubuntu express smb


    【解决方案1】:

    问题出在路径上

    '\\\\xxx\\app_folder'
    

    解决了问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-05-24
      • 2016-04-20
      • 1970-01-01
      • 2014-06-09
      • 1970-01-01
      • 1970-01-01
      • 2016-07-03
      相关资源
      最近更新 更多