Issues running ns/ns-vue for the first time


#1

Hello all,

I’m new to the forums and to NS and trying to run “hello world” app from nativescript-vue docs:

As recommended in the docs I went through the windows setup sequence:
https://docs.nativescript.org/start/ns-setup-win#setup-steps

tns doctor produces the following:

√ Getting environment information

√ Your ANDROID_HOME environment variable is set and points to correct directory.
√ Your adb from the Android SDK is correctly installed.
√ The Android SDK is installed.
√ A compatible Android SDK for compilation is found.
√ Javac is installed and is configured properly.
√ The Java Development Kit (JDK) is installed and is configured properly.
√ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
No issues were detected.
√ Getting NativeScript components versions information…
√ Component nativescript has 4.0.2 version and is up to date.
× Component tns-core-modules is not installed.
× Component tns-android is not installed.
× Component tns-ios is not installed.

but now when I try to start the app I get the following error:

C:\Users\alexe\Dropbox\2017\work\webdesign\nsv\helloworld>npm run watch:android

helloworld@1.0.0 watch:android C:\Users\alexe\Dropbox\2017\work\webdesign\nsv\helloworld
npm run watch – --env.android

helloworld@1.0.0 watch C:\Users\alexe\Dropbox\2017\work\webdesign\nsv\helloworld
webpack --watch --env.tnsAction run “–env.android”

info: Copying NativeScript plugins to template dependencies…
info: Preparing NativeScript application from template…
npm WARN helloworld@ No repository field.

info: Bundling application for android…

Webpack is watching the files…

(node:19024) ExperimentalWarning: The fs.promises API is experimental
Executing post-build scripts
info: Running NativeScript application…
Searching for devices…
Starting Android emulator with image Nexus_5X_API_27_x86
error: uncaughtException: Command failed: node launch.js run android
date=Wed May 23 2018 08:15:37 GMT-0700 (Pacific Daylight Time), pid=19024, uid=null, gid=null, cwd=C:\Users\alexe\Dropbox\2017\work\webdesign\nsv\helloworld, execPath=C:\Program Files\nodejs\node.exe, version=v10.1.0, argv=[C:\Program Files\nodejs\node.exe, C:\Users\alexe\Dropbox\2017\work\webdesign\nsv\helloworld\node_modules\webpack\bin\webpack.js, --watch, --env.tnsAction, run, --env.android], rss=97124352, heapTotal=74440704, heapUsed=62952840, external=432791, loadavg=[0, 0, 0], uptime=75639, trace=[column=12, file=child_process.js, function=ChildProcess.exithandler, line=282, method=exithandler, native=false, column=13, file=events.js, function=ChildProcess.emit, line=182, method=emit, native=false, column=16, file=internal/child_process.js, function=maybeClose, line=957, method=null, native=false, column=11, file=internal/child_process.js, function=Socket.stream.socket.on, line=378, method=on, native=false, column=13, file=events.js, function=Socket.emit, line=182, method=emit, native=false, column=12, file=net.js, function=Pipe._handle.close [as _onclose], line=598, method=close [as _onclose], native=false], stack=[Error: Command failed: node launch.js run android, , at ChildProcess.exithandler (child_process.js:282:12), at ChildProcess.emit (events.js:182:13), at maybeClose (internal/child_process.js:957:16), at Socket.stream.socket.on (internal/child_process.js:378:11), at Socket.emit (events.js:182:13), at Pipe._handle.close [as _onclose] (net.js:598:12)]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! helloworld@1.0.0 watch: webpack --watch --env.tnsAction run "--env.android"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the helloworld@1.0.0 watch 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! C:\Users\alexe\AppData\Roaming\npm-cache_logs\2018-05-23T15_15_56_256Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! helloworld@1.0.0 watch:android: npm run watch -- --env.android
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the helloworld@1.0.0 watch: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! C:\Users\alexe\AppData\Roaming\npm-cache_logs\2018-05-23T15_15_56_359Z-debug.log

any help is appreciated. Thank you!