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.

Type of Issue

[X] Bug Report
[ ] Feature Request

Description

I am trying to figure out what are these warnings and how to fix them. (I have huge lines of code as donation from different team)

Dropping unreachable code [0:2023,8] Declarations in unreachable code! [0:2023,8] Dropping unreachable code [0:2066,12] Declarations in unreachable code! [0:2066,12] Dropping unreachable code [0:2172,8] Declarations in unreachable code! [0:2172,8] Dropping unreachable code [0:2247,8] Declarations in unreachable code! [0:2247,8] Dropping unreachable code [0:2275,8] Declarations in unreachable code! [0:2275,8] Dropping unreachable code [0:2282,8] Declarations in unreachable code! [0:2282,8] Dropping unreachable code [0:2538,8] Declarations in unreachable code! [0:2538,8] Dropping unreachable code [0:2568,8] Declarations in unreachable code! [0:2568,8] Dropping unreachable code [0:2849,8] Declarations in unreachable code! [0:2849,8] Dropping unreachable code [0:3185,8] Declarations in unreachable code! [0:3185,8] Side effects in initialization of unused variable nF [0:4241,40] Side effects in initialization of unused variable UJ [0:4820,40] Dropping unreachable code [0:5050,12] Declarations in unreachable code! [0:5050,12] Side effects in initialization of unused variable ZM [0:5262,40] Side effects in initialization of unused variable AN [0:5356,57] Side effects in initialization of unused variable HN [0:5373,57] Side effects in initialization of unused variable eO [0:5433,57] Side effects in initialization of unused variable zO [0:5530,40] Side effects in initialization of unused variable LP [0:5917,40] Dropping duplicated definition of variable AQ [0:6224,16] Dropping duplicated definition of variable KQ [0:6247,16] Dropping duplicated definition of variable KQ [0:6256,16] Side effects in initialization of unused variable sS [0:6846,40] Side effects in initialization of unused variable zS [0:6858,40] Side effects in initialization of unused variable VS [0:6933,40] Side effects in initialization of unused variable WS [0:6933,56] Side effects in initialization of unused variable lT [0:6982,40] Dropping unreachable code [0:3597,8] Declarations in unreachable code! [0:3597,8]

How To Reproduce

ng build library-name

Expected Behaviour

There should not be any warnings. Or when ng build reports warning at-least provide some sensible information (like file names, method names etc…)for a developer to fix them. Right now looking at the warning reported above I am not able to find out where to start.

Version Information

$ node_modules/.bin/ng-packagr --version
ng-packagr:            4.4.5
@angular/compiler:     7.0.1
rollup:                0.67.4
tsickle:               0.33.1
typescript:            3.1.1
rxjs: 6.3.3
node: 8.12.0

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
changhuixucommented, Aug 29, 2019

same here. Minifying UMD bundle step has warnings about Dropping side-effect-free statement

Any ideas?

0reactions
github-actions[bot]commented, Jun 19, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

C# Compiler Options - errors and warnings - Microsoft Learn
The following options control how the compiler reports errors and warnings. The new MSBuild syntax is shown in Bold.
Read more >
Why can't I see build warnings for… | Apple Developer Forums
Building with the xcodebuild command line utility shows warnings fine, and when I switch to the Report Navigator I see the warning symbol...
Read more >
Compiler warnings - IBM
Warnings indicate other unusual conditions in your code that might indicate a problem, although compilation can (and does) proceed.
Read more >
Warning Options (Using the GNU Compiler Collection (GCC))
3.8 Options to Request or Suppress Warnings. Warnings are diagnostic messages that report constructions that are not inherently erroneous but that are risky ......
Read more >
Why Bother with Compiler Warnings? - Cprogramming.com
Why Compiler Warnings are Your Friends ... Compilers emit both erorrs, which prevent your code from compiling at all, and warnings, which indicate...
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