tejado / telegram-nearby-map

Discover the location of nearby Telegram users 📡🌍
GNU General Public License v3.0
1.04k stars 149 forks source link

NPM bugs with tdlib #8

Closed justadoll closed 2 years ago

justadoll commented 2 years ago

Hello, trying to start app from linux and linux, made npm install, configureg config.js and getting errors: LINUX:

npm run buildParcel && npm run startServer

> telegram-nearby-map@ buildParcel /home/supadm/web/telegram-nearby-map
> parcel build ./web-src/index.html --public-url / --dist-dir ./web-build/

/home/supadm/web/telegram-nearby-map/node_modules/@parcel/core/lib/Parcel.js:149
  #requestTracker
  ^

SyntaxError: Invalid or unexpected token
    at new Script (vm.js:83:7)
    at NativeCompileCache._moduleCompile (/home/supadm/web/telegram-nearby-map/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
    at Module._compile (/home/supadm/web/telegram-nearby-map/node_modules/v8-compile-cache/v8-compile-cache.js:184:36)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (/home/supadm/web/telegram-nearby-map/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/home/supadm/web/telegram-nearby-map/node_modules/@parcel/core/lib/index.js:81:39)
/home/supadm/web/telegram-nearby-map/node_modules/@parcel/logger/lib/Logger.js:41
  #logEmitter
  ^

SyntaxError: Invalid or unexpected token
    at new Script (vm.js:83:7)
    at NativeCompileCache._moduleCompile (/home/supadm/web/telegram-nearby-map/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
    at Module._compile (/home/supadm/web/telegram-nearby-map/node_modules/v8-compile-cache/v8-compile-cache.js:184:36)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at _logger (/home/supadm/web/telegram-nearby-map/node_modules/parcel/lib/cli.js:54:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! telegram-nearby-map@ buildParcel: `parcel build ./web-src/index.html --public-url / --dist-dir ./web-build/`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the telegram-nearby-map@ buildParcel script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/supadm/.npm/_logs/2021-11-18T15_06_52_552Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! telegram-nearby-map@ start: `npm run buildParcel && npm run startServer`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the telegram-nearby-map@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/supadm/.npm/_logs/2021-11-18T15_06_52_577Z-debug.log

I can send log file if it's needed

MACOS:

/Users/macbook/tools/telegram-nearby-map/node_modules/tdl-tdlib-addon/dist/index.js:37
    this._addon.load_tdjson(libraryFile);
                ^

Error: Dynamic Loading Error: dlopen(./libtdjson.so, 0x0005): tried: './libtdjson.so' (not a mach-o file), '/usr/local/lib/libtdjson.so' (not a mach-o file), '/usr/lib/libtdjson.so' (no such file), '/Users/macbook/tools/telegram-nearby-map/lib/tdlib/libtdjson.so' (not a mach-o file), '/usr/local/lib/libtdjson.so' (not a mach-o file), '/usr/lib/libtdjson.so' (no such file)
    at new TDLib (/Users/macbook/tools/telegram-nearby-map/node_modules/tdl-tdlib-addon/dist/index.js:37:17)

Installed tdlib via brew and copyed binary files to /usr/local/lib/ from https://github.com/Bannerets/tdlib-binaries/tree/master/1.2.0/macos and linux but it steel doesn't worked(

It would be greate if you can create a docker image or help with bugfixing on one of platforms Waiting for reply ;)

justadoll commented 2 years ago

Linux: npm -v 6.14.4 node -v v10.19.0

MacOS npm -v 8.1.0 node --version v17.0.1

tejado commented 2 years ago

Hi,

For linux: Please see https://github.com/tejado/telegram-nearby-map/issues/7 -> update node to version 14 or 16 please.

For macOS: I can try to provide a fix there, but I'm not able to test it. Would you test it for me?

lagosnomad commented 2 years ago

Hello,

I also have the same issue with Mac OS.

Have you provided a fix? i can help test if a fix is available.

image