EddyVerbruggen / nativescript-bluetooth-demo

30 stars 21 forks source link

Hang/Stall when using local nativescript-bluetooth dependency #19

Open paulpv opened 6 years ago

paulpv commented 6 years ago

Steps:

  1. git clone https://github.com/EddyVerbruggen/nativescript-bluetooth.git
  2. cd nativescript-bluetooth
  3. tns install
  4. cd ..
  5. git clone https://github.com/EddyVerbruggen/nativescript-bluetooth-demo.git
  6. cd nativescript-bluetooth-demo/Bluetooth
  7. tns install
  8. [Optional] tns update
  9. tns run android <== WORKS!
  10. tns plugin add ../../nativescript-bluetooth
  11. tns run android <== ERROR MESSAGE & HANG
$ tns run android
Searching for devices...
Executing before-prepare hook from /Users/pv/Development/GitHub/temp/nativescript-bluetooth-demo/Bluetooth/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 2.4.2
Preparing project...
Unable to apply changes on device: 84B7N16302003073. Error is: cp: cannot create directory '/Users/pv/Development/GitHub/temp/nativescript-bluetooth-demo/Bluetooth/platforms/android/src/main/assets/app/tns_modules': No such file or directory.
Executing after-watch hook from /Users/pv/Development/GitHub/temp/nativescript-bluetooth-demo/Bluetooth/hooks/after-watch/nativescript-dev-typescript.js

^== No more output for >10 minutes, so I give up and Ctrl-Break.

FWIW, at least one other project that I have tried, https://github.com/bradmartin/nativescript-snackbar, has displayed a similar error and hang.

I have no idea what is wrong w/ my setup.

I have tried w/ node 9.5.0 + npm 5.6.0, and node 8.9.1 + npm 5.5.1 (what bradmartin said he is using). This is on MacOS 10.12.6.

paulpv commented 6 years ago

Work-Around:

  1. Install nvm
  2. nvm install 6.12.3
  3. nvm use 6.12.3
  4. cd .../nativescript-bluetooth
  5. rm -R node_modules
  6. rm -R platforms
  7. cd .../nativescript-bluetooth-demo
  8. rm -R node_modules
  9. rm -R platforms
  10. tns update
  11. tns run android <== WORKS!
paulpv commented 6 years ago

Added https://github.com/NativeScript/nativescript-cli/pull/3360 to fix this