Skip to content

tns debug deploys even when build fails #4188

@tsonevn

Description

@tsonevn

@DanLatimer commented on Thu Nov 29 2018

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.0.1
  • Cross-platform modules: 5.0.0
  • Android Runtime: 5.0.0
  • iOS Runtime: 5.0.0
  • Plugin(s): n/a

Describe the bug
When running a typescript build. If the typescript compiler fails to compile one of the ts files the previously compiled version of it is still hanging out in the directory as a js file. Often that old version will still provide a working app and the tns debug command will move on to deploy to the device with a partially updated version of your software.

This version is not the state of your software before the compilation error as some ts files were compiled correctly, it's a mish mash of code that makes it difficult to tell when the compiler has exploded.

Expected Result: The tns command issues an error in the console and prevents a new native app from being deployed to the test device.

To Reproduce

  1. Create a nativescript typescript project with webpack
  2. Run tns debug android or tns debug ios
  3. Change one of the typescript files

Expected behavior
Compilation fails, no native app deployed to test device

Observed behaviour
Compilation fails, a mishmash app is deployed to the test device

Sample project

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions