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.

Better indication of where warnings happen

See original GitHub issue

Type of Issue

[ ] Bug Report
[x] Feature Request

Description

While running a build using ng-packagr different warnings can come up. Here is some examples:

Dropping unreachable code [0:1066,8]
Declarations in unreachable code! [0:1066,8]
Dropping unreachable code [0:1172,16]
Declarations in unreachable code! [0:1172,16]
Side effects in initialization of unused variable Vi [0:3321,37]

How To Reproduce

Just write some code which triggers some of those warnings and build it

Expected Behaviour

I don’t just see, that there are warnings, but I also get indications of where those warnings happen. In order to be able to fix them, I’d atleast need to know the file where they actually come up.

Version Information

ng-packagr:            3.0.0-rc.5
@angular/compiler:     6.0.2
rollup:                0.58.2
tsickle:               0.27.2
typescript:            2.7.2

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
tobiasschweizercommented, Nov 12, 2018

@pfeigl Your solution worked for me, thanks a lot. But I had had to copy and paste it into node_modules/ng-packagr/lib/flatten/uglify.js of my project. What is the recommended way to configure this?

1reaction
abbazabactocommented, May 23, 2018

👍 for showing the filename (incl. line and col number) and the uglify warning originated from, maybe even with mention this is coming from uglify

with the commit from @pfeigl I was able to solve the warnings in no time

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Psychology of Warnings - Human Factors
Many studies have found that warning signs are more likely to be ineffective if the cost of compliance is high. Reducing compliance costs...
Read more >
Watch/Warning/Advisory Definitions - National Weather Service
A Flood Warning is issued when flooding is imminent or occurring. A River Flood Watch is issued when river flooding is possible at...
Read more >
Tornado watch vs warning: What to do when you see alert ...
A warning means that either a tornado has been spotted or a radar has picked one up. If you are in an area...
Read more >
Warning Signs and Risk Factors for Emotional Distress
Some warning signs of distress in children ages 6 to 11 include: Withdrawing from playgroups and friends; Competing more for the attention of ......
Read more >
Bad Things Happen When You Ignore Warning Signs - Medium
Failures at work. Research has found that most organizations do not learn well from failures. However, these failures, which are often warning signs,...
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