Nativescript: Error is: ENOENT no such file or directory, open '/home/sagar/myprojects/dummy/node_modules/rc/package.json'.

Created on 22 Jun 2018  Â·  9Comments  Â·  Source: NativeScript/NativeScript

Hi,

I am facing this issue while performing tns commands for Android. Here are my environment details.
OS : Ubuntu 18.04 LTS
Node : 8.10.0
NPM : 3.5.2
tns : 3.4.2
tns-android : 3.4.2

Package.json

{
  "name": "dummy",
  "version": "1.0.0",
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "com.transworld.avana",
    "tns-ios": {
      "version": "3.4.1"
    },
    "tns-android": {
      "version": "3.4.2"
    }
  },
  "dependencies": {
    "nativescript": "^4.0.0",
    "nativescript-gradient": "^2.0.1",
    "nativescript-iqkeyboardmanager": "^1.3.0",
    "nativescript-pdf-view": "^2.0.1",
    "nativescript-theme-core": "~1.0.4",
    "nativescript-ui-sidedrawer": "^3.5.1",
    "tns-android": "3.4.2",
    "tns-core-modules": "~3.4.0",
    "update": "^0.7.4"
  },
  "devDependencies": {
    "babel-traverse": "6.4.5",
    "babel-types": "6.4.5",
    "babylon": "6.4.5",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "~0.6.0",
    "typescript": "~2.4.2"
  }
}

Log:

Loading extensions.
Asserting extension nativescript-cloud is installed.
Extension nativescript-cloud is installed.
Asserting extension nativescript-starter-kits is installed.
Extension nativescript-starter-kits is installed.
execFile: /home/sagar/Android/Sdk/platform-tools/adb "help"Exec uname -a
 stdout: Linux sagarpc 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

 stderr:
Exec npm -v
 stdout: 3.5.2

 stderr:
Exec node-gyp -v
 stdout: v3.6.2

 stderr:
Exec '/home/sagar/Android/Sdk/platform-tools/adb' version
 stdout: Android Debug Bridge version 1.0.40
Version 4797878
Installed as /home/sagar/Android/Sdk/platform-tools/adb

 stderr:
spawn: /home/sagar/Android/Sdk/emulator/emulator "-help"
Result when throw error is false:
{ stdout: 'Android Emulator usage: emulator [options] [-qemu args]\n  options:\n    -list-avds                             list available AVDs\n    -sysdir <dir>                          search for system disk images in <dir>\n    -system <file>                         read initial system image from <file>\n    -vendor <file>                         read initial vendor image from <file>\n    -writable-system     make system & vendor image writable after \'adb remount\'\n    -datadir <dir>                         write user data into <dir>\n    -kernel <file>                         use specific emulated kernel\n    -ramdisk <file>                        ramdisk image (default <system>/ramdisk.img\n    -image <file>                          obsolete, use -system <file> instead\n    -initdata <file>                       same as \'-init-data <file>\'\n    -data <file>                           data image (default <datadir>/userdata-qemu.img\n    -encryption-key <file>              read initial encryption key image from <file>\n    -logcat-output <file>                  output file of logcat(default none)\n  -partition-size <size>                 system/data partition size in MBs\n    -cache <file>                          cache partition image (default is temporary file)\n    -cache-size <size>                     cache partition size in MBs\n    -no-cache                              disable the cache partition\n    -nocache                               same as -no-cache\n    -sdcard <file>                         SD card image (default <datadir>/sdcard.img\n    -quit-after-boot <timeout>             qeuit emulator after guest boots completely, or after timeout inseconds\n    -snapstorage <file>                    file that contains all state snapshots (default <datadir>/snapshots.img)\n    -no-snapstorage                        do not mount a snapshot storage file (this disables all snapshot functionality)\n    -snapshot <name>       name of snapshot within storage file for auto-start and auto-save (default \'default-boot\')\n    -no-snapshot perform a full boot and do not auto-save, but qemu vmload and vmsave operate on snapstorage\n    -no-snapshot-save                      do not auto-save to snapshot on exit: abandon changed state\n    -no-snapshot-load                      do not auto-start from snapshot: perform a full boot\n    -snapshot-list                         show a list of available snapshots\n    -no-snapshot-update-time               do not try to correct snapshot time on restore\n    -wipe-data                             reset the user data image (copy it from initdata)\n    -avd <name>                            use a specific android virtual device\n    -skindir <dir>                         search skins in <dir> (default<system>/skins)\n    -skin <name>                           select a given skin\n    -no-skin                               deprecated: createan AVD with no skin instead\n    -noskin                                same as -no-skin\n    -memory <size>                         physical RAM size in MBs\n    -ui-only <UI feature>                  run only the UI feature requested\n    -cores <number>                        Set number of CPU cores to emulator\n    -accel <mode>                          Configure emulation acceleration\n    -no-accel        Same as \'-accel off\'\n    -ranchu                                Use new emulator backend instead of the classic one\n    -engine <engine>                       Select engine. auto|classic|qemu2\n    -netspeed <speed>                      maximum network download/upload speeds\n    -netdelay <delay>                      network latency emulation\n    -netfast                               disable network shaping\n  -code-profile <name>                   enable code profiling\n    -show-kernel                           display kernel messages\n    -shell                                enable root shell on current terminal\n    -no-jni                                disable JNI checks in the Dalvik runtime\n    -nojni                                 same as -no-jni\n    -logcat <tags>                         enable logcat output with given tags\n    -use-system-libs                       Use system libstdc++ instead of bundled one\n    -bluetooth <vendorid:productid>        forward bluetooth to vendorid:productid\n    -no-audio                              disable audio support\n    -noaudio      same as -no-audio\n    -audio <backend>                       use specific audio backend\n    -radio <device>                        redirect radio modem interface to character device\n    -port <port>                           TCP port that will be used for the console\n    -ports <consoleport>,<adbport>         TCP ports used for the console and adb bridge\n    -onion <image>                         use overlay PNG image over screen\n    -onion-alpha <%age>                    specify onion-skin translucency\n    -onion-rotation 0|1|2|3                specify onion-skin rotation\n    -dpi-device <dpi>                      specify device\'s resolution in dpi (default 165)\n    -scale <scale>                scale emulator window (deprecated)\n    -http-proxy <proxy>                    make TCP connections through a HTTP/HTTPS proxy\n    -timezone <timezone>                   use this timezone instead of the host\'s default\n    -dns-server <servers>                  use this DNS server(s) in the emulated system\n    -net-tap <interface>                   use this TAP interface for networking\n    -net-tap-script-up <script>            script to run when the TAP interface goes up\n    -net-tap-script-down <script>          script to run when the TAP interface goes down\n    -cpu-delay <cpudelay>                  throttle CPU emulation\n    -no-boot-anim                          disable animation for faster boot\n    -no-window                             disable graphical window display\n    -no-sim                                device has no SIM card\n    -lowram                                device is a low ram device\n    -version                               display emulator version number\n    -no-passive-gps                        disable passive gps updates\n    -report-console <socket>               report console port to remote socket\n    -gps <device>                          redirect NMEA GPS to character device\n    -shell-serial <device>                specific character device for root shell\n    -tcpdump <file>                        capture network packets to file\n    -bootchart <timeout>                   enable bootcharting\n    -charmap <file>                        use specific key character map\n    -studio-params <file>                  used by Android Studio to provide parameters\n    -prop <name>=<value>                   set system property on boot\n    -shared-net-id <number>                join the shared network, using IP address 10.1.2.<number>\n    -nand-limits <nlimits>       enforce NAND/Flash read/write thresholds\n    -gpu <mode>                            set hardware OpenGLES emulation mode\n    -camera-back <mode>                    set emulation mode for a camera facing back\n    -camera-front <mode>                   set emulation mode for acamera facing front\n    -webcam-list                           lists web cameras available for emulation\n    -virtualscene-poster <name>=<filename> Load a png or jpeg image as a poster in the virtual scene\n    -screen <mode>                         set emulated screen mode\n    -selinux <disabled|permissive>         Set SELinux to either disabled or permissive mode\n    -unix-pipe <path>                      Add <path> tothe list of allowed Unix pipes\n    -fixed-scale                           Use fixed 1:1 scale for the initial emulator window.\n    -wait-for-debugger                     Pause on launch and wait for a debugger process to attach before resuming\n    -skip-adb-auth    Skip adb authentication dialogue\n    -metrics-to-console                    Enable usage metrics and print the messages to stdout\n    -metrics-to-file <file>                Enable usage metrics and write the messages into specified file\n    -feature <name|-name> Force-enable or disable (-name) the features\n    -sim-access-rules-file <file>          Use SIM access rules from specified file\n    -phone-number <phone_number>           Sets the phone number of the emulated device\n\n     -qemu args...                         pass arguments to qemu\n     -qemu -h                              display qemu help\n\n     -verbose                              same as \'-debug-init\'\n     -debug <tags>                         enable/disable debug messages\n     -debug-<tag>                          enable specific debug messages\n    -debug-no-<tag>                       disable specific debug messages\n\n     -help                                 print this help\n     -help-<option>                        print option-specific help\n\n     -help-disk-images                     about disk images\n     -help-debug-tags                      debug tags for -debug <tags>\n     -help-char-devices                    character <device> specification\n     -help-environment                     environment variables\n     -help-virtual-device                  virtual device management\n     -help-sdk-images                      about disk images when using the SDK\n     -help-build-images                    about disk images when building Android\n     -help-all                             prints all help content\n\n',
  stderr: '',
  exitCode: 0 }
The result of checking is Android Emulator installed is:
- stdout: Android Emulator usage: emulator [options] [-qemu args]
  options:
    -list-avds                             list available AVDs
    -sysdir <dir>                          search for system disk images in <dir>
    -system <file>                         read initial system image from <file>
    -vendor <file>                         read initial vendor image from <file>
    -writable-system                       make system & vendor image writable after 'adb remount'
    -datadir <dir>                         write user data into <dir>
    -kernel <file>                         use specific emulated kernel
    -ramdisk <file>                        ramdisk image (default <system>/ramdisk.img
    -image <file>                          obsolete, use -system <file> instead
    -initdata <file>                       same as '-init-data <file>'
    -data <file>                           data image (default <datadir>/userdata-qemu.img
    -encryption-key <file>                 read initial encryption key image from <file>
    -logcat-output <file>                  output file of logcat(default none)
    -partition-size <size>                 system/data partition size in MBs
    -cache <file>                          cache partition image (default is temporary file)
    -cache-size <size>                     cache partition size in MBs
    -no-cache                              disable the cache partition
    -nocache                               same as -no-cache
    -sdcard <file>                         SD card image (default <datadir>/sdcard.img
    -quit-after-boot <timeout>             qeuit emulator after guest boots completely, or after timeout in seconds
    -snapstorage <file>                    file that contains all state snapshots (default <datadir>/snapshots.img)
    -no-snapstorage                        do not mount a snapshot storage file (this disables all snapshot functionality)
    -snapshot <name>                       name of snapshot within storage file for auto-start and auto-save (default 'default-boot')
    -no-snapshot                           perform a full boot and do not auto-save, but qemu vmload and vmsave operate on snapstorage
    -no-snapshot-save                      do not auto-save to snapshot on exit: abandon changed state
    -no-snapshot-load                      do not auto-start from snapshot: perform a full boot
    -snapshot-list                         show a list of available snapshots
    -no-snapshot-update-time               do not try to correct snapshot time on restore
    -wipe-data                             reset the user data image (copy it from initdata)
    -avd <name>                            use a specific android virtual device
    -skindir <dir>                         search skins in <dir> (default <system>/skins)
    -skin <name>                           select a given skin
    -no-skin                               deprecated: create an AVD with no skin instead
    -noskin                                same as -no-skin
    -memory <size>                         physical RAM size in MBs
    -ui-only <UI feature>                  run only the UI feature requested
    -cores <number>                        Set number of CPU cores to emulator
    -accel <mode>                          Configure emulation acceleration
    -no-accel                              Same as '-accel off'
    -ranchu                                Use new emulator backend instead of the classic one
    -engine <engine>                       Select engine. auto|classic|qemu2
    -netspeed <speed>                      maximum network download/upload speeds
    -netdelay <delay>                      network latency emulation
    -netfast                               disable network shaping
    -code-profile <name>                   enable code profiling
    -show-kernel                           display kernel messages
    -shell                                 enable root shell on current terminal
    -no-jni                                disable JNI checks in the Dalvik runtime
    -nojni                                 same as -no-jni
    -logcat <tags>                         enable logcat output with given tags
    -use-system-libs                       Use system libstdc++ instead of bundled one
    -bluetooth <vendorid:productid>        forward bluetooth to vendorid:productid
    -no-audio                              disable audio support
    -noaudio                               same as -no-audio
    -audio <backend>                       use specific audio backend
    -radio <device>                        redirect radio modem interface to character device
    -port <port>                           TCP port that will be used for the console
    -ports <consoleport>,<adbport>         TCP ports used for the console and adb bridge
    -onion <image>                         use overlay PNG image over screen
    -onion-alpha <%age>                    specify onion-skin translucency
    -onion-rotation 0|1|2|3                specify onion-skin rotation
    -dpi-device <dpi>                      specify device's resolution in dpi (default 165)
    -scale <scale>                         scale emulator window (deprecated)
    -http-proxy <proxy>                    make TCP connections through a HTTP/HTTPS proxy
    -timezone <timezone>                   use this timezone instead of the host's default
    -dns-server <servers>                  use this DNS server(s) in the emulated system
    -net-tap <interface>                   use this TAP interface for networking
    -net-tap-script-up <script>            script to run when the TAP interface goes up
    -net-tap-script-down <script>          script to run when the TAP interface goes down
    -cpu-delay <cpudelay>                  throttle CPU emulation
    -no-boot-anim                          disable animation for faster boot
    -no-window                             disable graphical window display
    -no-sim                                device has no SIM card
    -lowram                                device is a low ram device
    -version                               display emulator version number
    -no-passive-gps                        disable passive gps updates
    -report-console <socket>               report console port to remote socket
    -gps <device>                          redirect NMEA GPS to character device
    -shell-serial <device>                 specific character device for root shell
    -tcpdump <file>                        capture network packets to file
    -bootchart <timeout>                   enable bootcharting
    -charmap <file>                        use specific key character map
    -studio-params <file>                  used by Android Studio to provide parameters
    -prop <name>=<value>                   set system property on boot
    -shared-net-id <number>                join the shared network, using IP address 10.1.2.<number>
    -nand-limits <nlimits>                 enforce NAND/Flash read/write thresholds
    -gpu <mode>                            set hardware OpenGLES emulation mode
    -camera-back <mode>                    set emulation mode for a camera facing back
    -camera-front <mode>                   set emulation mode for a camera facing front
    -webcam-list                           lists web cameras available for emulation
    -virtualscene-poster <name>=<filename> Load a png or jpeg image as a poster in the virtual scene
    -screen <mode>                         set emulated screen mode
    -selinux <disabled|permissive>         Set SELinux to either disabled or permissive mode
    -unix-pipe <path>                      Add <path> to the list of allowed Unix pipes
    -fixed-scale                           Use fixed 1:1 scale for the initial emulator window.
    -wait-for-debugger                     Pause on launch and wait for a debugger process to attach before resuming
    -skip-adb-auth                         Skip adb authentication dialogue
    -metrics-to-console                    Enable usage metrics and print the messages to stdout
    -metrics-to-file <file>                Enable usage metrics and write the messages into specified file
    -feature <name|-name>                  Force-enable or disable (-name) the features
    -sim-access-rules-file <file>          Use SIM access rules from specified file
    -phone-number <phone_number>           Sets the phone number of the emulated device

     -qemu args...                         pass arguments to qemu
     -qemu -h                              display qemu help

     -verbose                              same as '-debug-init'
     -debug <tags>                         enable/disable debug messages
     -debug-<tag>                          enable specific debug messages
     -debug-no-<tag>                       disable specific debug messages

     -help                                 print this help
     -help-<option>                        print option-specific help

     -help-disk-images                     about disk images
     -help-debug-tags                      debug tags for -debug <tags>
     -help-char-devices                    character <device> specification
     -help-environment                     environment variables
     -help-virtual-device                  virtual device management
     -help-sdk-images                      about disk images when using the SDK
     -help-build-images                    about disk images when building Android
     -help-all                             prints all help content


- stderr:
Exec mono --version
 stdout:
 stderr: /bin/sh: 1: mono: not found

Error while executing mono --version: Command failed: mono --version
/bin/sh: 1: mono: not found

Exec git --version
 stdout: git version 2.17.1

 stderr:
Exec gradle -v
 stdout:
 stderr: /bin/sh: 1: gradle: not found

Error while executing gradle -v: Command failed: gradle -v
/bin/sh: 1: gradle: not found

Exec "/usr/lib/jvm/java-8-oracle/bin/javac" -version
 stdout:
 stderr: javac 1.8.0_171

System information:
{ procInfo: 'nativescript/3.4.2',
  platform: 'linux',
  os: 'Linux sagarpc 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux\n',
  shell: '/bin/bash',
  dotNetVer: null,
  procArch: 'x64',
  nodeVer: 'v8.10.0',
  npmVer: '3.5.2',
  nodeGypVer: 'v3.6.2\n',
  xcodeVer: null,
  xcodeprojGemLocation: null,
  itunesInstalled: false,
  cocoapodVer: null,
  adbVer: 'Android Debug Bridge version 1.0.40',
  emulatorInstalled: true,
  monoVer: null,
  gitVer: '2.17.1',
  gradleVer: null,
  javacVersion: '1.8.0_171' }
Looking for project in '/home/sagar/myprojects/dummy'
Project directory is '/home/sagar/myprojects/dummy'.
Installed Android Targets are:  [ 'android-26', 'android-27', 'android-28' ]
Directories found in /home/sagar/Android/Sdk/build-tools are 27.0.0, 27.0.1, 27.0.2, 27.0.3, 28.0.0
Versions found in /home/sagar/Android/Sdk/build-tools are 27.0.0, 27.0.1, 27.0.2, 27.0.3, 28.0.0
Selected version is:  27.0.3
Selected targetSdk is: 27
Directories found in /home/sagar/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7 are 18.0.0, 19.0.0, 19.0.1, 19.1.0, 20.0.0, 21.0.0, 21.0.2, 21.0.3, 22.0.0, 22.1.0, 22.1.1, 22.2.0, 22.2.1, 23.0.0, 23.0.1, 23.1.0, 23.1.1, 23.2.0, 23.2.1, 23.3.0, 23.4.0, 24.0.0,24.0.0-alpha1, 24.0.0-alpha2, 24.0.0-beta1, 24.1.0, 24.1.1, 24.2.0, 24.2.1, 25.0.0, 25.0.1, 25.1.0, 25.1.1, 25.2.0, 25.3.0, 25.3.1, 26.0.0-alpha1, maven-metadata.xml, maven-metadata.xml.md5, maven-metadata.xml.sha1
Versions found in /home/sagar/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7 are 18.0.0, 19.0.0, 19.0.1, 19.1.0, 20.0.0, 21.0.0, 21.0.2, 21.0.3, 22.0.0, 22.1.0, 22.1.1, 22.2.0, 22.2.1, 23.0.0, 23.0.1, 23.1.0, 23.1.1, 23.2.0, 23.2.1, 23.3.0, 23.4.0, 24.0.0, 24.0.0, 24.0.0, 24.0.0, 24.1.0, 24.1.1, 24.2.0, 24.2.1, 25.0.0, 25.0.1, 25.1.0, 25.1.1, 25.2.0, 25.3.0, 25.3.1, 26.0.0
Selected version is:  undefined
Directories found in /home/sagar/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7 are 18.0.0, 19.0.0, 19.0.1, 19.1.0, 20.0.0, 21.0.0, 21.0.2, 21.0.3, 22.0.0, 22.1.0, 22.1.1, 22.2.0, 22.2.1, 23.0.0, 23.0.1, 23.1.0, 23.1.1, 23.2.0, 23.2.1, 23.3.0, 23.4.0, 24.0.0,24.0.0-alpha1, 24.0.0-alpha2, 24.0.0-beta1, 24.1.0, 24.1.1, 24.2.0, 24.2.1, 25.0.0, 25.0.1, 25.1.0, 25.1.1, 25.2.0, 25.3.0, 25.3.1, 26.0.0-alpha1, maven-metadata.xml, maven-metadata.xml.md5, maven-metadata.xml.sha1
Versions found in /home/sagar/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7 are 18.0.0, 19.0.0, 19.0.1, 19.1.0, 20.0.0, 21.0.0, 21.0.2, 21.0.3, 22.0.0, 22.1.0, 22.1.1, 22.2.0, 22.2.1, 23.0.0, 23.0.1, 23.1.0, 23.1.1, 23.2.0, 23.2.1, 23.3.0, 23.4.0, 24.0.0, 24.0.0, 24.0.0, 24.0.0, 24.1.0, 24.1.1, 24.2.0, 24.2.1, 25.0.0, 25.0.1, 25.1.0, 25.1.1, 25.2.0, 25.3.0, 25.3.1, 26.0.0
Selected version is:  26.0.0-alpha1
Selected AppCompat version is: 26.0.0-alpha1
Validate options for platform: Android
Initializing analytics statuses.
Analytics statuses:  { TrackFeatureUsage: 'disabled', TrackExceptions: 'disabled' }
Searching for devices...
startLookingForDevices; platform is Android
execFile: /home/sagar/Android/Sdk/platform-tools/adb "help"
spawn: /home/sagar/Android/Sdk/platform-tools/adb "start-server"
Result when throw error is false:
{ stdout: '', stderr: '', exitCode: 0 }
spawn: /home/sagar/Android/Sdk/platform-tools/adb "devices"
Trying to get information for Android device. Command is: getprop
spawn: /home/sagar/Android/Sdk/platform-tools/adb "-s" "emulator-5554" "shell" "getprop"
Result when throw error is false:
{ stdout: '[dalvik.vm.appimageformat]: [lz4]\n[dalvik.vm.dex2oat-Xms]: [64m]\n[dalvik.vm.dex2oat-Xmx]: [512m]\n[dalvik.vm.dexopt.secondary]: [true]\n[dalvik.vm.heapsize]: [384m]\n[dalvik.vm.image-dex2oat-Xms]: [64m]\n[dalvik.vm.image-dex2oat-Xmx]: [64m]\n[dalvik.vm.isa.x86.features]: [default]\n[dalvik.vm.isa.x86.variant]: [x86]\n[dalvik.vm.stack-trace-dir]: [/data/anr]\n[dalvik.vm.usejit]: [true]\n[dalvik.vm.usejitprofiles]: [true]\n[debug.atrace.tags.enableflags]: [0]\n[debug.force_rtl]: [0]\n[dev.bootcomplete]: [1]\n[drm.service.enabled]: [true]\n[gsm.current.phone-type]: [1]\n[gsm.defaultpdpcontext.active]: [true]\n[gsm.network.type]: [LTE]\n[gsm.nitz.time]: [1529642356039]\n[gsm.operator.alpha]: [Android]\n[gsm.operator.iso-country]: [us]\n[gsm.operator.isroaming]: [false]\n[gsm.operator.numeric]: [310260]\n[gsm.sim.operator.alpha]: [Android]\n[gsm.sim.operator.iso-country]: [us]\n[gsm.sim.operator.numeric]: [310260]\n[gsm.sim.state]: [READY]\n[gsm.version.ril-impl]: [android reference-ril 1.0]\n[hwservicemanager.ready]: [true]\n[init.svc.adbd]: [running]\n[init.svc.audio-hal-2-0]: [running]\n[init.svc.audioserver]: [running]\n[init.svc.bootanim]: [stopped]\n[init.svc.camera-provider-2-4]: [running]\n[init.svc.cameraserver]: [running]\n[init.svc.cas-hal-1-0]: [running]\n[init.svc.configstore-hal-1-0]: [running]\n[init.svc.dhcpclient_rtr]: [running]\n[init.svc.dhcpserver]: [running]\n[init.svc.drm]: [running]\n[init.svc.drm-hal-1-0]: [running]\n[init.svc.drm-widevine-hal-1-0]: [running]\n[init.svc.emu_hostapd]: [running]\n[init.svc.fps_hal]: [running]\n[init.svc.gatekeeper-1-0]: [running]\n[init.svc.gatekeeperd]: [running]\n[init.svc.gnss_service]: [running]\n[init.svc.goldfish-logcat]: [stopped]\n[init.svc.gralloc-2-0]: [running]\n[init.svc.healthd]: [running]\n[init.svc.hidl_memory]: [running]\n[init.svc.hostapd]: [stopped]\n[init.svc.hwcomposer-2-1]: [running]\n[init.svc.hwservicemanager]: [running]\n[init.svc.installd]: [running]\n[init.svc.ipv6proxy]: [running]\n[init.svc.keymaster-3-0]: [running]\n[init.svc.keystore]: [running]\n[init.svc.lmkd]: [running]\n[init.svc.logd]: [running]\n[init.svc.logd-reinit]: [stopped]\n[init.svc.mdnsd]: [running]\n[init.svc.media]: [running]\n[init.svc.mediacodec]: [running]\n[init.svc.mediadrm]: [running]\n[init.svc.mediaextractor]: [running]\n[init.svc.mediametrics]: [running]\n[init.svc.misc-pipe]: [running]\n[init.svc.netd]: [running]\n[init.svc.power-hal-1-0]: [running]\n[init.svc.qemu-props]: [running]\n[init.svc.ranchu-net]: [stopped]\n[init.svc.ranchu-setup]: [stopped]\n[init.svc.ril-daemon]: [running]\n[init.svc.sensors-hal-1-0]: [running]\n[init.svc.servicemanager]: [running]\n[init.svc.storaged]: [running]\n[init.svc.surfaceflinger]: [running]\n[init.svc.thermalservice]: [running]\n[init.svc.tombstoned]: [running]\n[init.svc.ueventd]: [running]\n[init.svc.vndservicemanager]: [running]\n[init.svc.vold]: [running]\n[init.svc.webview_zygote32]: [running]\n[init.svc.wifi_hal_legacy]: [running]\n[init.svc.wificond]: [running]\n[init.svc.wpa_supplicant]: [running]\n[init.svc.zygote]: [running]\n[media.mediadrmservice.enable]: [true]\n[net.bt.name]: [Android]\n[net.eth0.dns1]: [10.0.2.3]\n[net.eth0.dns2]: []\n[net.eth0.dns3]: []\n[net.eth0.dns4]: []\n[net.eth0.gw]: [10.0.2.2]\n[net.qtaguid_enabled]: [1]\n[net.tcp.default_init_rwnd]: [60]\n[persist.sys.dalvik.vm.lib.2]: [libart.so]\n[persist.sys.gps.lpp]: []\n[persist.sys.timezone]: [Asia/Kolkata]\n[persist.sys.usb.config]: [adb]\n[persist.sys.webview.vmsize]: [139722440]\n[pm.dexopt.ab-ota]: [speed-profile]\n[pm.dexopt.bg-dexopt]: [speed-profile]\n[pm.dexopt.boot]: [verify]\n[pm.dexopt.first-boot]: [quicken]\n[pm.dexopt.inactive]: [verify]\n[pm.dexopt.install]: [quicken]\n[pm.dexopt.shared]: [speed]\n[qemu.adb.secure]: [1]\n[qemu.adbd]: [start]\n[qemu.gles]: [1]\n[qemu.hw.mainkeys]: [0]\n[qemu.sf.fake_camera]: [front]\n[qemu.sf.lcd_density]: [420]\n[qemu.timezone]: [Asia/Kolkata]\n[rild.libpath]: [/vendor/lib/libreference-ril.so]\n[ro.adb.secure]: [1]\n[ro.allow.mock.location]: [0]\n[ro.baseband]: [unknown]\n[ro.board.platform]: []\n[ro.boot.android_dt_dir]: [/sys/bus/platform/devices/ANDR0001:00/properties/android/]\n[ro.boot.hardware]: [ranchu]\n[ro.bootimage.build.date]: [Tue Feb 6 01:02:48 UTC 2018]\n[ro.bootimage.build.date.utc]: [1517878968]\n[ro.bootimage.build.fingerprint]: [google/sdk_gphone_x86/generic_x86:8.1.0/OSM1.180201.007/4586646:user/release-keys]\n[ro.bootloader]: [unknown]\n[ro.bootmode]: [unknown]\n[ro.build.characteristics]: [emulator]\n[ro.build.date]: [Tue Feb  6 01:02:48UTC 2018]\n[ro.build.date.utc]: [1517878968]\n[ro.build.description]: [sdk_gphone_x86-user 8.1.0 OSM1.180201.007 4586646 release-keys]\n[ro.build.display.id]: [OSM1.180201.007]\n[ro.build.fingerprint]: [google/sdk_gphone_x86/generic_x86:8.1.0/OSM1.180201.007/4586646:user/release-keys]\n[ro.build.flavor]: [sdk_gphone_x86-user]\n[ro.build.host]: [abfarm281]\n[ro.build.id]: [OSM1.180201.007]\n[ro.build.product]: [generic_x86]\n[ro.build.tags]: [release-keys]\n[ro.build.type]: [user]\n[ro.build.user]: [android-build]\n[ro.build.version.all_codenames]: [REL]\n[ro.build.version.base_os]: []\n[ro.build.version.codename]: [REL]\n[ro.build.version.incremental]: [4586646]\n[ro.build.version.preview_sdk]: [0]\n[ro.build.version.release]: [8.1.0]\n[ro.build.version.sdk]: [27]\n[ro.build.version.security_patch]: [2018-01-05]\n[ro.com.google.locationfeatures]: [1]\n[ro.config.alarm_alert]: [Alarm_Classic.ogg]\n[ro.config.notification_sound]: [OnTheHunt.ogg]\n[ro.crypto.fs_crypto_blkdev]: [/dev/block/dm-0]\n[ro.crypto.state]: [encrypted]\n[ro.crypto.type]: [block]\n[ro.dalvik.vm.native.bridge]: [0]\n[ro.debuggable]: [0]\n[ro.device_owner]: [false]\n[ro.hardware]: [ranchu]\n[ro.hardware.audio.primary]: [goldfish]\n[ro.hwui.drop_shadow_cache_size]: [6]\n[ro.hwui.gradient_cache_size]: [1]\n[ro.hwui.layer_cache_size]: [48]\n[ro.hwui.path_cache_size]: [32]\n[ro.hwui.r_buffer_cache_size]: [8]\n[ro.hwui.text_large_cache_height]: [1024]\n[ro.hwui.text_large_cache_width]: [2048]\n[ro.hwui.text_small_cache_height]: [1024]\n[ro.hwui.text_small_cache_width]: [1024]\n[ro.hwui.texture_cache_flushrate]: [0.4]\n[ro.hwui.texture_cache_size]: [72]\n[ro.kernel.android.checkjni]: [1]\n[ro.kernel.android.qemud]: [1]\n[ro.kernel.androidboot.android_dt_dir]: [/sys/bus/platform/devices/ANDR0001:00/properties/android/]\n[ro.kernel.androidboot.hardware]: [ranchu]\n[ro.kernel.clocksource]: [pit]\n[ro.kernel.cma]: [288M@0-4G]\n[ro.kernel.console]: [0]\n[ro.kernel.mac80211_hwsim.channels]: [2]\n[ro.kernel.memmap]: [0x10000$0xff018000]\n[ro.kernel.qemu]: [1]\n[ro.kernel.qemu.encrypt]: [1]\n[ro.kernel.qemu.gles]: [1]\n[ro.kernel.qemu.opengles.version]:[131072]\n[ro.kernel.qemu.wifi]: [1]\n[ro.kernel.ramoops.mem_address]: [0xff018000]\n[ro.kernel.ramoops.mem_size]: [0x10000]\n[ro.opengles.version]: [131072]\n[ro.product.board]: []\n[ro.product.brand]: [google]\n[ro.product.cpu.abi]: [x86]\n[ro.product.cpu.abilist]: [x86]\n[ro.product.cpu.abilist32]: [x86]\n[ro.product.cpu.abilist64]: []\n[ro.product.device]: [generic_x86]\n[ro.product.locale]: [en-US]\n[ro.product.manufacturer]: [Google]\n[ro.product.model]: [Android SDK built for x86]\n[ro.product.name]: [sdk_gphone_x86]\n[ro.property_service.version]: [2]\n[ro.radio.use-ppp]: [no]\n[ro.revision]: [0]\n[ro.secure]: [1]\n[ro.serialno]: []\n[ro.setupwizard.mode]: [EMULATOR]\n[ro.treble.enabled]: [true]\n[ro.vendor.build.date]: [Tue Feb 6 01:02:48 UTC 2018]\n[ro.vendor.build.date.utc]: [1517878968]\n[ro.vendor.build.fingerprint]: [google/sdk_gphone_x86/generic_x86:8.1.0/OSM1.180201.007/4586646:user/release-keys]\n[ro.vendor.product.brand]: [google]\n[ro.vendor.product.device]: [generic_x86]\n[ro.vendor.product.manufacturer]: [Google]\n[ro.vendor.product.model]: [Android SDK built for x86]\n[ro.vendor.product.name]: [sdk_gphone_x86]\n[ro.wifi.channels]: []\n[ro.zygote]: [zygote32]\n[security.perf_harden]: [1]\n[service.bootanim.exit]: [1]\n[service.sf.present_timestamp]: [0]\n[status.battery.level]: [5]\n[status.battery.level_raw]: [50]\n[status.battery.level_scale]: [9]\n[status.battery.state]: [Slow]\n[sys.boot_completed]: [1]\n[sys.logbootcomplete]: [1]\n[sys.rescue_boot_count]: [1]\n[sys.retaildemo.enabled]: [0]\n[sys.sysctl.extra_free_kbytes]: [24300]\n[sys.sysctl.tcp_def_init_rwnd]: [60]\n[sys.usb.config]: [adb]\n[sys.usb.configfs]: [999]\n[sys.usb.ffs.mtp.ready]: [1]\n[sys.user.0.ce_available]: [true]\n[sys.wifitracing.started]: [1]\n[vold.decrypt]: [trigger_restart_framework]\n[vold.has_adoptable]: [0]\n[vold.has_quota]: [1]\n[vold.post_fs_data_done]: [1]\n[wifi.interface]: [wlan0]\n',
  stderr: '',
  exitCode: 0 }
{ characteristics: 'emulator',
  date: 'Tue Feb  6 01:02:48 UTC 2018',
  'date.utc': '1517878968',
  description: 'sdk_gphone_x86-user 8.1.0 OSM1.180201.007 4586646 release-keys',
  'display.id': 'OSM1.180201.007',
  fingerprint: 'google/sdk_gphone_x86/generic_x86:8.1.0/OSM1.180201.007/4586646:user/release-keys',
  flavor: 'sdk_gphone_x86-user',
  host: 'abfarm281',
  id: 'OSM1.180201.007',
  product: 'generic_x86',
  tags: 'release-keys',
  type: 'user',
  user: 'android-build',
  all_codenames: 'REL',
  base_os: '',
  codename: 'REL',
  incremental: '4586646',
  preview_sdk: '0',
  release: '8.1.0',
  sdk: '27',
  security_patch: '2018-01-05',
  board: '',
  brand: 'google',
  'cpu.abi': 'x86',
  'cpu.abilist': 'x86',
  'cpu.abilist32': 'x86',
  'cpu.abilist64': '',
  device: 'generic_x86',
  locale: 'en-US',
  manufacturer: 'Google',
  model: 'Android SDK built for x86',
  name: 'sdk_gphone_x86' }
{ characteristics: 'emulator',
  date: 'Tue Feb  6 01:02:48 UTC 2018',
  'date.utc': '1517878968',
  description: 'sdk_gphone_x86-user 8.1.0 OSM1.180201.007 4586646 release-keys',
  'display.id': 'OSM1.180201.007',
  fingerprint: 'google/sdk_gphone_x86/generic_x86:8.1.0/OSM1.180201.007/4586646:user/release-keys',
  flavor: 'sdk_gphone_x86-user',
  host: 'abfarm281',
  id: 'OSM1.180201.007',
  product: 'generic_x86',
  tags: 'release-keys',
  type: 'user',
  user: 'android-build',
  all_codenames: 'REL',
  base_os: '',
  codename: 'REL',
  incremental: '4586646',
  preview_sdk: '0',
  release: '8.1.0',
  sdk: '27',
  security_patch: '2018-01-05',
  board: '',
  brand: 'google',
  'cpu.abi': 'x86',
  'cpu.abilist': 'x86',
  'cpu.abilist32': 'x86',
  'cpu.abilist64': '',
  device: 'generic_x86',
  locale: 'en-US',
  manufacturer: 'Google',
  model: 'Android SDK built for x86',
  name: 'sdk_gphone_x86' }
execFile: /home/sagar/Android/Sdk/platform-tools/adb "devices"
{ identifier: 'emulator-5554',
  displayName: 'sdk_gphone_x86',
  model: 'Android SDK built for x86',
  version: '8.1.0',
  vendor: 'google',
  platform: 'Android',
  status: 'Connected',
  errorHelp: null,
  isTablet: false,
  type: 'Emulator' }
Found device with identifier 'emulator-5554'
startLookingForDevices; platform is Android
spawn: /home/sagar/Android/Sdk/platform-tools/adb "devices"
spawn: /home/sagar/Android/Sdk/platform-tools/adb "devices"
Project dir from hooksArgs is: /home/sagar/myprojects/dummy.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
  '/usr/local/lib/node_modules/nativescript/lib/common/hooks',
  '/home/sagar/myprojects/dummy/hooks' ]
BeforeHookName for command liveSync is before-liveSync
Creating NativeScript project for the android platform
Path: /home/sagar/myprojects/dummy/platforms/android
Package: com.transworld.avana
Name: customerbookingportalmobile
Copying template files...
Installing  tns-android
spawn: npm "install" "[email protected]" "--silent" "--save-exact" "--save"
  â—¡ Installing [email protected] /home/sagar/myprojects/dummy
└── [email protected] g tns-android

spawn: npm "install" "[email protected]" "--silent" "--save-exact" "--save" "--json" "--dry-run" "--prefix" "/home/sagar/MyProjects/AvanaNew/cu
stomer-booking-portal-mobile"
Unable to apply changes on device: emulator-5554. Error is: ENOENT: no such file or directory, open '/home/sagar/myprojects/dummy/node_modules/rc/package.json'.
Project dir from hooksArgs is: /home/sagar/myprojects/dummy.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
  '/usr/local/lib/node_modules/nativescript/lib/common/hooks',
  '/home/sagar/myprojects/dummy/hooks' ]
AfterHookName for command watch is after-watch
Executing after-watch hook from /home/sagar/myprojects/dummy/hooks/after-watch/nativescript-dev-typescript.js
Executing after-watch hook at location /home/sagar/myprojects/dummy/hooks/after-watch/nativescript-dev-typescript.js in-process
Validating after-watch arguments.
Project dir from hooksArgs is: /home/sagar/myprojects/dummy.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
  '/usr/local/lib/node_modules/nativescript/lib/common/hooks',
  '/home/sagar/myprojects/dummy/hooks' ]
AfterHookName for command liveSync is after-liveSync

Thanks.

Most helpful comment

In case it helps someone else, I experienced this same error message when upgrading a NativeScript project from v3 to v5. In my case I had "npm": "^6.2.0" as a dependency. Removing that solved the issue.

All 9 comments

@sagar1911 you don't need the nativescript as a dependency in your package.json. The CLI should be installed globally and allows you to use tns related commands via your terminal and also enables the build of your NativeScript applications but is not need inside your project. You might also want to update your project to the latest NativeScript (both CLI and all project's related dependencies like tns-core-modules, runtimes, plugins, etc.)

Thanks @NickIliev ,

I didn't add that dependency intentionally. somehow it came up. I tried removing that but while building the project its adding again. I can use latest ns cli but it is taking lot of time to build(sometimes for every save its building the project). So I switched to other version.

@sagar1911 the issue seems related to your configuration file. Please remove "tns-android": "3.4.2" and 'nativescript' from the list of dependencies. Then remove node_modules and platforms folder and rebuild the project.

You can also update to latest

npm uninstall -g nativescript
npm i -g nativescript
npm i tns-core-modules@latest --save
tns platform add android@latest

Closing as the issue does not seems related to a bug in NativeScript but to a specific local project configuration. Let me know if the steps above are not resolving your issue and we can continue the discussion here

Thanks a lot @NickIliev ,

Those steps fixed the issue.

In case it helps someone else, I experienced this same error message when upgrading a NativeScript project from v3 to v5. In my case I had "npm": "^6.2.0" as a dependency. Removing that solved the issue.

I am getting the error below..

[18-12-12 08:54:50.383] Error detected during LiveSync on 737b2aa3985b1bcbe8136bbdaf92ba823495e599 for
...\XYZ. Error: Processing node_modules failed. Error: ENOENT: no such file or directory, open '...platforms\ios\XYZapptns_modulesnpmnode_modules\node-gypnode_modules.binpackage.json'

...
all logs while building the app on iOS

[18-12-12 08:54:32.692] (CLI) Platform ios successfully added. v5.0.0
[18-12-12 08:54:33.155] (CLI) Preparing project...
[18-12-12 08:54:33.493] (CLI) ...app\shared\my-drawer\MyDrawer.xml has syntax errors.
[18-12-12 08:54:33.496] (CLI) fatalError
[18-12-12 08:54:33.496] (CLI) end tag name: StackLayout is not match the current start tagName:StackLayout
[18-12-12 08:54:33.496] (CLI) @#[line:9,col:57]
[18-12-12 08:54:33.560] (CLI) ...app\timeexp\timedetail\home-page.xml has syntax errors.
[18-12-12 08:54:33.562] (CLI) fatalError
[18-12-12 08:54:33.562] (CLI) end tag name: Card:CardView is not match the current start tagName:Card:CardView
[18-12-12 08:54:33.562] (CLI) @#[line:136,col:14]
[18-12-12 08:54:33.617] (CLI) ...app\TimeExpenseApproval\Time\TimeDetailApprove-page.xml has syntax errors.
[18-12-12 08:54:33.617] (CLI) fatalError
[18-12-12 08:54:33.617] (CLI) end tag name: Card:CardView is not match the current start tagName:Card:CardView
[18-12-12 08:54:33.617] (CLI) @#[line:74,col:21]
[18-12-12 08:54:50.378] (CLI) Unable to apply changes on device: 737b2aa3985b1bcbe8136bbdaf92ba823495e599. Error is: Processing node_modules failed. Error: ENOENT: no such file or directory, open '...platforms\ios\XYZapptns_modulesnpmnode_modules\node-gypnode_modules.binpackage.json'.
[18-12-12 08:54:50.383] Error detected during LiveSync on 737b2aa3985b1bcbe8136bbdaf92ba823495e599 for
...\XYZ. Error: Processing node_modules failed. Error: ENOENT: no such file or directory, open '...platforms\ios\XYZapptns_modulesnpmnode_modules\node-gypnode_modules.binpackage.json'
[18-12-12 08:54:50.397] Stopped LiveSync on 737b2aa3985b1bcbe8136bbdaf92ba823495e599 for ...\XYZ.

I have repeated all steps mentioned above, but no help.

I am getting the error below..

[18-12-12 08:54:50.383] Error detected during LiveSync on 737b2aa3985b1bcbe8136bbdaf92ba823495e599 for
...\XYZ. Error: Processing node_modules failed. Error: ENOENT: no such file or directory, open '...platforms\ios\XYZapptns_modulesnpmnode_modules\node-gypnode_modules.binpackage.json'

...
all logs while building the app on iOS

[18-12-12 08:54:32.692] (CLI) Platform ios successfully added. v5.0.0
[18-12-12 08:54:33.155] (CLI) Preparing project...
[18-12-12 08:54:33.493] (CLI) ...app\shared\my-drawer\MyDrawer.xml has syntax errors.
[18-12-12 08:54:33.496] (CLI) fatalError
[18-12-12 08:54:33.496] (CLI) end tag name: StackLayout is not match the current start tagName:StackLayout
[18-12-12 08:54:33.496] (CLI) @#[line:9,col:57]
[18-12-12 08:54:33.560] (CLI) ...app\timeexp\timedetail\home-page.xml has syntax errors.
[18-12-12 08:54:33.562] (CLI) fatalError
[18-12-12 08:54:33.562] (CLI) end tag name: Card:CardView is not match the current start tagName:Card:CardView
[18-12-12 08:54:33.562] (CLI) @#[line:136,col:14]
[18-12-12 08:54:33.617] (CLI) ...app\TimeExpenseApproval\Time\TimeDetailApprove-page.xml has syntax errors.
[18-12-12 08:54:33.617] (CLI) fatalError
[18-12-12 08:54:33.617] (CLI) end tag name: Card:CardView is not match the current start tagName:Card:CardView
[18-12-12 08:54:33.617] (CLI) @#[line:74,col:21]
[18-12-12 08:54:50.378] (CLI) Unable to apply changes on device: 737b2aa3985b1bcbe8136bbdaf92ba823495e599. Error is: Processing node_modules failed. Error: ENOENT: no such file or directory, open '...platforms\ios\XYZapptns_modulesnpmnode_modules\node-gypnode_modules.binpackage.json'.
[18-12-12 08:54:50.383] Error detected during LiveSync on 737b2aa3985b1bcbe8136bbdaf92ba823495e599 for
...\XYZ. Error: Processing node_modules failed. Error: ENOENT: no such file or directory, open '...platforms\ios\XYZapptns_modulesnpmnode_modules\node-gypnode_modules.binpackage.json'
[18-12-12 08:54:50.397] Stopped LiveSync on 737b2aa3985b1bcbe8136bbdaf92ba823495e599 for ...\XYZ.

I have repeated all steps mentioned above, but no help.

i having the same problem. do you solve it ?

@seaware THANKS, you saved me a whole lot of time.
After struggling for more than an hour on that error it came out the issue was npm in the packages list.
Removing it just made the whole thing to work correctly.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings