nativescript-community / ble

Connect to and interact with Bluetooth LE peripherals.
https://nativescript-community.github.io/ble/
MIT License
190 stars 77 forks source link

Demo App does not work #214

Open FloStar3000 opened 3 years ago

FloStar3000 commented 3 years ago

Hi, I just tried to check out this library, but the demo App does not seem to work. My Steps: ` git clone https://github.com/nativescript-community/ble.git cd ble npm run prepare

@nativescript-community/ble@1.0.0 prepare /home/florian/ble npm run setup

@nativescript-community/ble@1.0.0 setup /home/florian/ble ts-patch install

[!] Error: Cannot find module 'typescript/package.json' from '/home/florian/ble'

npm run test.android

@nativescript-community/ble@1.0.0 test.android /home/florian/ble npm i && npm run tsc && npm run tslint && cd demo && tns build android && tns test android --justlaunch

npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that. npm WARN deprecated har-validator@5.1.5: this library is no longer supported

husky@4.3.8 install /home/florian/ble/node_modules/husky node husky install

husky > Setting up git hooks husky > Done

core-js@3.9.1 postinstall /home/florian/ble/node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

https://opencollective.com/core-js https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

ejs@2.7.4 postinstall /home/florian/ble/node_modules/ejs node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

nodemon@2.0.7 postinstall /home/florian/ble/node_modules/nodemon node bin/postinstall || exit 0

@nativescript/core@7.0.13 postinstall /home/florian/ble/node_modules/@nativescript/core node cli-hooks/postinstall.js

@nativescript/webpack@3.0.0 postinstall /home/florian/ble/node_modules/@nativescript/webpack node postinstall.js

Skipping postinstall artifacts! We assumed the @nativescript/webpack is installing devDependencies

husky@4.3.8 postinstall /home/florian/ble/node_modules/husky opencollective-postinstall || exit 0

Thank you for using husky! If you rely on this package, please consider supporting our open collective:

https://opencollective.com/husky/donate

@nativescript-community/ble@1.0.0 prepare /home/florian/ble npm run setup

@nativescript-community/ble@1.0.0 setup /home/florian/ble ts-patch install

[+] ts-patch installed! npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN @octokit/plugin-request-log@1.0.3 requires a peer of @octokit/core@>=3 but none is installed. You must install peer dependencies yourself.

added 1686 packages from 639 contributors and audited 1690 packages in 23.319s

96 packages are looking for funding run npm fund for details

found 2 vulnerabilities (1 moderate, 1 high) run npm audit fix to fix them, or npm audit for details

@nativescript-community/ble@1.0.0 tsc /home/florian/ble cp src/bluetooth.d.ts plugin && tsc -skipLibCheck -d

@nativescript-community/ble@1.0.0 tslint /home/florian/ble tslint "src/*/.ts" --config tslint.json --exclude "/node_modules/"

Invalid option for configuration: tslint.json npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @nativescript-community/ble@1.0.0 tslint: tslint "src/**/*.ts" --config tslint.json --exclude "**/node_modules/**" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @nativescript-community/ble@1.0.0 tslint 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/florian/.npm/_logs/2021-03-29T15_24_32_685Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @nativescript-community/ble@1.0.0 test.android: npm i && npm run tsc && npm run tslint && cd demo && tns build android && tns test android --justlaunch npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @nativescript-community/ble@1.0.0 test.android 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/florian/.npm/_logs/2021-03-29T15_24_32_726Z-debug.log

cat /home/florian/.npm/_logs/2021-03-29T15_24_32_726Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'test.android' ] 2 info using npm@6.14.11 3 info using node@v14.16.0 4 verbose run-script [ 'pretest.android', 'test.android', 'posttest.android' ] 5 info lifecycle @nativescript-community/ble@1.0.0~pretest.android: @nativescript-community/ble@1.0.0 6 info lifecycle @nativescript-community/ble@1.0.0~test.android: @nativescript-community/ble@1.0.0 7 verbose lifecycle @nativescript-community/ble@1.0.0~test.android: unsafe-perm in lifecycle true 8 verbose lifecycle @nativescript-community/ble@1.0.0~test.android: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/florian/ble/node_modules/.bin:/home/florian/apps/gradle/gradle-6.8.3/bin:/home/florian/.npm-global/bin:/home/florian/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/florian/Android/Sdk/tools/bin:/home/florian/Android/Sdk/platform-tools:/home/florian/Android/Sdk/emulator 9 verbose lifecycle @nativescript-community/ble@1.0.0~test.android: CWD: /home/florian/ble 10 silly lifecycle @nativescript-community/ble@1.0.0~test.android: Args: [ 10 silly lifecycle '-c', 10 silly lifecycle 'npm i && npm run tsc && npm run tslint && cd demo && tns build android && tns test android --justlaunch' 10 silly lifecycle ] 11 silly lifecycle @nativescript-community/ble@1.0.0~test.android: Returned: code: 1 signal: null 12 info lifecycle @nativescript-community/ble@1.0.0~test.android: Failed to exec test.android script 13 verbose stack Error: @nativescript-community/ble@1.0.0 test.android: npm i && npm run tsc && npm run tslint && cd demo && tns build android && tns test android --justlaunch 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:315:20) 13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:315:20) 13 verbose stack at maybeClose (internal/child_process.js:1048:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) 14 verbose pkgid @nativescript-community/ble@1.0.0 15 verbose cwd /home/florian/ble 16 verbose Linux 5.8.0-48-generic 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "test.android" 18 verbose node v14.16.0 19 verbose npm v6.14.11 20 error code ELIFECYCLE 21 error errno 1 22 error @nativescript-community/ble@1.0.0 test.android: npm i && npm run tsc && npm run tslint && cd demo && tns build android && tns test android --justlaunch 22 error Exit status 1 23 error Failed at the @nativescript-community/ble@1.0.0 test.android script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ] `

farfromrefug commented 3 years ago

the tslint needs to be removed. until then you can run the app Directly from the demo directoty