question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`tns run android --bundle` doesn't pause on webpack compilation error

See original GitHub issue

Please, provide the details below:

Tell us about the problem

When you run tns run android --bundle and the webpack compilation fails, the CLI continues with native build, installing the app, etc. It should fail instead.

Note: tns build android --bundle works correctly.

Which platform(s) does your issue occur on?

I tested it only on Android.

Please provide the following version numbers that your issue occurs with:

  • CLI: next, reproducible with 4.1.2 too
  • Cross-platform modules: next
  • Runtime(s): next
  • Plugin(s): nativescript-dev-webpack is next

Please tell us how to recreate the issue in as much detail as possible.

Using the attached project:

tns run android --bundle

Is there code involved? If so, please share the minimal amount of code needed to

The attached project has an invalid require. jsapp.tar.gz

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Fatmecommented, Oct 23, 2019

Acceptance criteria:

  • Ensure webpack compilation stops on syntactic/semantic error in angular app whennoEmitOnError is true in tsconfig.json
  • Ensure app crashes runtime on syntactic/semantic error in angular app whennoEmitOnError is false in tsconfig.json
  • Ensure webpack compilation stops on wrong import in javascript or vue app whennoEmitOnErrors is true in webpack.confg.js
  • Ensure app doesn’t crash runtime on syntactic error in javascript or vue app whennoEmitOnErrors is false in webpack.confg.js
  • Ensure the new nativescript-dev-webpack plugin is backwards compatible with NativeScript CLI

known limitation:

0reactions
Fatmecommented, Dec 17, 2019

We have the following limitations due to the fact that errors are processed in a different manner from webpack’s loaders/plugins:

  • angular doesn’t report type errors while webpack is running as they started separate process for checking the errors
  • errors in .html files in angular apps are not reported to webpack
  • errors in .scss files in angular apps are reported to webpack
  • errors in .xml files are not reported to webpack
  • only Module not found error is handled by webpack in js/vue apps
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does tns run android work but when I add --bundle it ...
I am trying to get webpack up and running in my nativescript application using these instructions https://docs.nativescript.org/performance- ...
Read more >
Source - GitHub
... NativeScript CLI doesn't pause on webpack compilation errors * [Fixed #4681](https://github.com/NativeScript/nativescript-cli/issues/4681): `tns update ...
Read more >
IntelliJ IDEA 2022.1 (221.5080.210 build) Release Notes
Declare a main method in interface, with implementation has the run button display but could not run actually and get a runtime err....
Read more >
NativeScript 3.1.0: Performance Improvements and Timeline ...
Timeline: npm run start-android-bundle –uglify. The vanilla tns run doesn't incorporate the webpack and the Angular tooling. Running the practice buddy app ...
Read more >
Upgrading tips for Angular 10 projects - The NativeScript Blog
1. Update package.json · Updated package. · Remove platforms version from nativescript section, but keep id property. · Delete webpack. · Run npm ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found