NS Tutorial - Chapter 1.3 - Syntax Error Handling Not Working


#1

System Info:
OS: Win10 Pro x64 (current on updates)
tns --version: 2.5.2
I’m using Genymotion for my android emulation.
The virtual device is the included Samsung Galaxy S7 - 6.0.0 - API 23 - 1440x2560
I’m not doing anything iOS related at current.

I’m working through the tutorial, and this is my first hiccup, but it’s an important one and I haven’t been able to find a solution elsewhere. In the ‘Error Handling’ section, you are directed to intentionally introduce a syntax error while running your tutorial app in livesync. What is supposed to happen (according to the tutorial), is your console should show, among other stuff, a simple error pointing to the file / area where the error was. Pretty simple, standard stuff, but also very very important, especially when you’re learning. However, I’m not seeing that anywhere.

The output in the console on a fresh run, with the error from the tutorial in place (missing closing angle bracket):

C:\Users\JMassey\Documents\NativeScript\NativeScript Tutorial\HelloWorld>tns run android
Executing before-prepare hook from C:\Users\JMassey\Documents\NativeScript\NativeScript Tutorial\HelloWorld\hooks\before-prepare\nativescript-dev-android-snapshot.js
Executing before-prepare hook from C:\Users\JMassey\Documents\NativeScript\NativeScript Tutorial\HelloWorld\hooks\before-prepare\nativescript-dev-typescript.js
Found peer TypeScript 2.1.6
Preparing project...
Project successfully prepared (android)
Executing after-prepare hook from C:\Users\JMassey\Documents\NativeScript\NativeScript Tutorial\HelloWorld\hooks\after-prepare\nativescript-dev-android-snapshot.js
Searching for devices...
Skipping package build. No changes detected on the native side. This will be fast!
Skipping install.
Executing before-livesync hook from C:\Users\JMassey\Documents\NativeScript\NativeScript Tutorial\HelloWorld\hooks\before-livesync\nativescript-angular-sync.js
Transferring project files...
Successfully transferred all files.
Refreshing application...
Successfully synced application org.nativescript.HelloWorld on device 192.168.129.101:5555.

Executing before-watch hook from C:\Users\JMassey\Documents\NativeScript\NativeScript Tutorial\HelloWorld\hooks\before-watch\nativescript-dev-typescript.js
Found peer TypeScript 2.1.6
03-09 15:53:41.598  2621  2621 W System.err:    at com.tns.Runtime.callJSMethodNative(Native Method)
03-09 15:53:41.598  2621  2621 W System.err:    at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1197)
03-09 15:53:41.598  2621  2621 W System.err:    at com.tns.Runtime.callJSMethodImpl(Runtime.java:1061)
03-09 15:53:41.598  2621  2621 W System.err:    at com.tns.Runtime.callJSMethod(Runtime.java:1047)
03-09 15:53:41.598  2621  2621 W System.err:    at com.tns.Runtime.callJSMethod(Runtime.java:1028)
03-09 15:53:41.598  2621  2621 W System.err:    at com.tns.Runtime.callJSMethod(Runtime.java:1018)
1:53:42 PM - Compilation complete. Watching for file changes.

There is also a large amount of error output on the virtual device, but none of it looks useful to me / like what I’m looking for from the tutorial (the simple file / area of the error).

Is there something else I need to do to enable this output? I know it’s a small / simple thing, but on the other hand, it really will be, I suspect, super important as I’m trying to learn to use NativeScript to be able to quickly find at least the area where syntax errors of this sort happen.

Let me know if you need any more info. Also, I’m hoping that I’ve put this in the right category but wasn’t completely sure, there.


#2

Syntax Error Handling Not Working for me too. Not good.


#3

Hey all,

Thanks so much for reporting this problem. The template error handling was working fine with 2.5.0, so it seems that something regressed in the last minor release. I reported the problem in https://github.com/NativeScript/nativescript-cli/issues/2603 and we’ll dig into this.