Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unable to create client: ENOENT: no such file or directory, open 'my/dir/libtdjson.so #17

Closed
mariooc opened this issue May 31, 2018 · 3 comments

Comments

@mariooc
Copy link

mariooc commented May 31, 2018

`
const { Client } = require('tglib')
async function main() {
const client = new Client({
apiId: 'YOUR_API_ID',
apiHash: 'YOUR_API_HASH',
phoneNumber: 'YOUR_PHONE_NUMBER',
})

await client.connect()

const result = await client.fetch({
    '@type': 'getChats',
    'offset_order': '9223372036854775807',
    'offset_chat_id': 0,
    'limit': 100,
})

// latest 100 chats will be returned
console.log(result)

}

main()`

@nodegin
Copy link
Owner

nodegin commented May 31, 2018

Please double check your binary path is correct.

@mariooc
Copy link
Author

mariooc commented Jun 1, 2018

├── index.js
├── node_modules
│   ├── ansi-escapes
│   ├── ansi-regex
│   ├── ansi-styles
│   ├── bindings
│   ├── chalk
│   ├── chardet
│   ├── cli-cursor
│   ├── cli-width
│   ├── color-convert
│   ├── color-name
│   ├── debug
│   ├── escape-string-regexp
│   ├── external-editor
│   ├── ffi-napi
│   ├── figures
│   ├── get-symbol-from-current-process-h
│   ├── get-uv-event-loop-napi-h
│   ├── has-flag
│   ├── iconv-lite
│   ├── inquirer
│   ├── is-fullwidth-code-point
│   ├── is-promise
│   ├── lodash
│   ├── mimic-fn
│   ├── ms
│   ├── mute-stream
│   ├── node-addon-api
│   ├── onetime
│   ├── os-tmpdir
│   ├── ref-napi
│   ├── ref-struct-di
│   ├── restore-cursor
│   ├── run-async
│   ├── rxjs
│   ├── safer-buffer
│   ├── signal-exit
│   ├── string-width
│   ├── strip-ansi
│   ├── supports-color
│   ├── symbol-observable
│   ├── tglib
│   ├── through
│   ├── tmp
│   └── uuid
├── package.json
└── package-lock.json

index.js

`
const { Client } = require('tglib')

async function main() {
    const client = new Client({
        apiId       : 'YOUR_API_ID',
        apiHash     : 'YOUR_API_HASH',
        phoneNumber : 'YOUR_PHONE_NUMBER',
    })

    await client.connect()

    const result = await client.fetch({
        '@type'          : 'getChats',
        'offset_order'   : '9223372036854775807',
        'offset_chat_id' : 0,
        'limit'          : 100,
    })

    // latest 100 chats will be returned
    console.log(result)
}

main()

`

@nodegin
Copy link
Owner

nodegin commented Jun 1, 2018

You have to compile the binary yourself.

Getting started

Build the binary (https://github.com/tdlib/td#building)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants