HelloWorld stuck on Preparing project


#1

Hi,
I have created a HelloWorld project following https://docs.nativescript.org/tutorial/chapter-1
Its been 2 hours and its stuck on Preparing project…
I have the emulator up and running

C:\>tns device

Connected devices & emulators
Searching for devices...
┌───┬────────────────┬──────────┬───────────────────┬──────────┬───────────┐
│ # │ Device Name    │ Platform │ Device Identifier │ Type     │ Status    │
│ 1 │ sdk_gphone_x86 │ Android  │ emulator-5554     │ Emulator │ Connected │
└───┴────────────────┴──────────┴───────────────────┴──────────┴───────────┘

C:\>
C:\NProjects\HelloWorld>tns run android
Searching for devices...
Copying template files...
\ Installing tns-android
- [       ...........] / extract:tns-android: verb lock using C:\Users\dpft\AppData\Roaming\npm-cache\_locks\staging-c2c\ [       ...........] / extract:tns-android: verb lock using C:\Users\dpft\AppData\Roaming\npm-cache\_locks\staging-c2c| [       ...........] / extract:tns-android: verb lock using C:\Users\dpft\AppData\Roaming\npm-cache\_locks\staging-c2c/ [       ...........] - extract:tns-android: verb lock using C:\Users\dpft\AppData\Roaming\npm-cache\_locks\staging-c2c+ tns-android@4.0.1
added 1 package in 1.694s
| [       ...........] / extract:babel-traverse: verb lock using C:\Users\dpft\AppData\Roaming\npm-cache\_locks\staging-/ [       ...........] / extract:babel-traverse: verb lock using C:\Users\dpft\AppData\Roaming\npm-cache\_locks\staging-- [       ...........] / extract:babel-traverse: verb lock using C:\Users\dpft\AppData\Roaming\npm-cache\_locks\staging-\ [         .........] \ extract:to-fast-properties: sill extract to-fast-properties@^1.0.3 extracted to C:\NProjects\He| [           .......] | extract:babylon: sill extract babylon@^6.4.5 extracted to C:\NProjects\HelloWorld\node_modules\/ [           .......] / extract:babel-types: sill extract babel-types@^6.4.5 extracted to C:\NProjects\HelloWorld\node_- [           .......] - extract:babel-traverse: sill extract babel-traverse@6.4.5 extracted to C:\NProjects\HelloWorld\\ [           .......] - extract:babel-traverse: sill extract babel-traverse@6.4.5 extracted to C:\NProjects\HelloWorld\| [           .......] - extract:babel-traverse: sill extract babel-traverse@6.4.5 extracted to C:\NProjects\HelloWorld\/ [           .......] - extract:babel-traverse: sill extract babel-traverse@6.4.5 extracted to C:\NProjects\HelloWorld\- [           .......] - extract:babel-traverse: sill extract babel-traverse@6.4.5 extracted to C:\NProjects\HelloWorld\\ [           .......] | extract:babel-runtime: sill extract babel-runtime@^6.22.0 extracted to C:\NProjects\HelloWorld\| [           .......] / extract:babel-runtime: sill extract babel-runtime@^5.0.0 extracted to C:\NProjects\HelloWorld\n/ [           .......] / extract:babel-runtime: sill extract babel-runtime@^5.0.0 extracted to C:\NProjects\HelloWorld\n- [           .......] / extract:babel-runtime: sill extract babel-runtime@^5.0.0 extracted to C:\NProjects\HelloWorld\n\ [           .......] - extract:lodash: sill extract lodash@^3.10.1 extracted to C:\NProjects\HelloWorld\node_modules\.| [           .......] - extract:lodash: sill extract lodash@^3.10.1 extracted to C:\NProjects\HelloWorld\node_modules\./ [           .......] - extract:lodash: sill extract lodash@^3.10.1 extracted to C:\NProjects\HelloWorld\node_modules\.- [           .......] - extract:lodash: sill extract lodash@^3.10.1 extracted to C:\NProjects\HelloWorld\node_modules\.\ [           .......] - extract:lodash: sill extract lodash@^3.10.1 extracted to C:\NProjects\HelloWorld\node_modules\.| [           .......] - extract:lodash: sill extract lodash@^3.10.1 extracted to C:\NProjects\HelloWorld\node_modules\./ [            ......] | extract:core-js: sill extract core-js@^1.0.0 extracted to C:\NProjects\HelloWorld\node_modules\- [            ......] | extract:core-js: sill extract core-js@^1.0.0 extracted to C:\NProjects\HelloWorld\node_modules\\ [            ......] | extract:core-js: sill extract core-js@^1.0.0 extracted to C:\NProjects\HelloWorld\node_modules\| [            ......] | extract:core-js: sill extract core-js@^1.0.0 extracted to C:\NProjects\HelloWorld\node_modules\+ babel-traverse@6.4.5
added 31 packages from 13 contributors in 6.481s
| [..................] \ fetchMetadata: sill removeObsoleteDep removing to-fast-properties@1.0.3 from the tree as its be| [            ......] | remove:babel-runtime: sill remove C:\NProjects\HelloWorld\node_modules\babel-types\node_modules/ [            ......] | remove:babel-runtime: sill remove C:\NProjects\HelloWorld\node_modules\babel-types\node_modules+ babel-types@6.4.5
removed 2 packages and updated 1 package in 1.717s
+ babylon@6.4.5
updated 1 package in 1.573s
+ lazy@1.0.11
added 1 package from 1 contributor in 1.617s
Project successfully created.
Preparing project...

Thank you


#2

Do you have Android SDK installed and added to the path?


#3

Everything is installed perfectly fine still it doesn’t work.


#4

Any updates on this?


#5

Try setting log level to verbose and see where exactly it stuck. Use help command to see how to set log level.


#6

Its stuck for more than 12 hours. I left it to run overnight.


#7

Any updates on this?


#8

I’m also seeing this - running Android and iOS devices.
It’ll get stuck on Preparing project and then Executing before-prepareJSApp and then do nothing from there. Sometimes the application will run successfully, sometimes it will hang forever, and occasionally it’ll start with no issues at all.

EDIT:

appears you can get your project working again if you delete hooks, platforms and node_modules and run tns run <platform> again. Bit meh as far as developer experience goes but w/e.