Error while: npm run watch:android [NS+VueJS]


#1

Hello, I have installed everything normally but when I try running my project I get this error, I really don’t know what to do beyond this point. I have followed this quick start guide: https://nativescript-vue.org/en/docs/getting-started/quick-start/

Any help would be greatly appreciated


   vue-cli · Generated "rpg".


C:\Users\Angel>cd rpg

C:\Users\Angel\rpg>npm install
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.

> node-sass@4.9.2 install C:\Users\Angel\rpg\node_modules\node-sass
> node scripts/install.js

Cached binary found at C:\Users\Angel\AppData\Roaming\npm-cache\node-sass\4.9.2\win32-x64-57_binding.node

> uglifyjs-webpack-plugin@0.4.6 postinstall C:\Users\Angel\rpg\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js


> node-sass@4.9.2 postinstall C:\Users\Angel\rpg\node_modules\node-sass
> node scripts/build.js

Binary found at C:\Users\Angel\rpg\node_modules\node-sass\vendor\win32-x64-57\binding.node
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN rpg@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 795 packages in 45.975s

C:\Users\Angel\rpg>npm run watch:android

> rpg@1.0.0 watch:android C:\Users\Angel\rpg
> npm run watch -- --env.android


> rpg@1.0.0 watch C:\Users\Angel\rpg
> webpack --watch --env.tnsAction run "--env.android"

info: Copying NativeScript plugins to template dependencies...
info: Preparing NativeScript application from template...
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN rpg@ No repository field.

info: Bundling application for android...

Webpack is watching the files…

Executing post-build scripts
info: Running NativeScript application...
error: uncaughtException: Command failed: node launch.js run android
 date=Thu Aug 02 2018 02:11:41 GMT+0200 (W. Europe Daylight Time), pid=9248, uid=null, gid=null, cwd=C:\Users\Angel\rpg, execPath=C:\Program Files\nodejs\node.exe, version=v8.11.3, argv=[C:\Program Files\nodejs\node.exe, C:\Users\Angel\rpg\node_modules\webpack\bin\webpack.js, --watch, --env.tnsAction, run, --env.android], rss=145092608, heapTotal=120500224, heapUsed=89749224, external=1279196, loadavg=[0, 0, 0], uptime=8865.2327386, trace=[column=12, file=child_process.js, function=ChildProcess.exithandler, line=275, method=exithandler, native=false, column=13, file=events.js, function=emitTwo, line=126, method=null, native=false, column=7, file=events.js, function=ChildProcess.emit, line=214, method=emit, native=false, column=16, file=internal/child_process.js, function=maybeClose, line=925, method=null, native=false, column=11, file=internal/child_process.js, function=Socket.stream.socket.on, line=346, method=on, native=false, column=13, file=events.js, function=emitOne, line=116, method=null, native=false, column=7, file=events.js, function=Socket.emit, line=211, method=emit, native=false, column=12, file=net.js, function=Pipe._handle.close [as _onclose], line=557, method=close [as _onclose], native=false], stack=[Error: Command failed: node launch.js run android, ,     at ChildProcess.exithandler (child_process.js:275:12),     at emitTwo (events.js:126:13),     at ChildProcess.emit (events.js:214:7),     at maybeClose (internal/child_process.js:925:16),     at Socket.stream.socket.on (internal/child_process.js:346:11),     at emitOne (events.js:116:13),     at Socket.emit (events.js:211:7),     at Pipe._handle.close [as _onclose] (net.js:557:12)]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rpg@1.0.0 watch: `webpack --watch --env.tnsAction run "--env.android"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rpg@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\Angel\AppData\Roaming\npm-cache\_logs\2018-08-02T00_11_41_763Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rpg@1.0.0 watch:android: `npm run watch -- --env.android`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rpg@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\Angel\AppData\Roaming\npm-cache\_logs\2018-08-02T00_11_41_796Z-debug.log



#2

Have you installed Android SDK and added it’s path to environment variable.


#3

Did it. But, I still get the same error :expressionless:


#4

I fixed it without any more trouble.