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.

error TS2451: Cannot redeclare block-scoped variable 'ngDevMode'

See original GitHub issue

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x ] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11): error TS2451: Cannot redeclare block-scoped variable ‘ngDevMode’. node_modules/adv-view-js-comp-core/node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11): error TS2451: Cannot redeclare block-scoped variable ‘ngDevMode’. declare global { const ngDevMode: boolean; } export declare const _ngDevMode: boolean; export {};

Expected behavior

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Angular version: 5.2.1


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  Windows

Others:

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:42
  • Comments:51 (6 by maintainers)

github_iconTop GitHub Comments

62reactions
avatsaevcommented, Oct 24, 2018

had to add this line in the main tsconfig

image

60reactions
vicbcommented, Jan 30, 2018

Closing as no proper repro. I would really help if someone could create a new issue with a proper repro. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot redeclare block-scoped variable 'ngDevMode'
I ran into the same error, although I think it was caused by a reference to a Typescript file located in a different...
Read more >
Angular – How to fix “cannot redeclare block-scoped variable ...
ERROR in node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11): error TS2451: Cannot redeclare block-scoped variable 'ngDevMode'.
Read more >
Angular 6 error ts2451 cannot redeclare block scoped ...
The variable in this case will be the “a” which represents part of a long number but I have only the first two...
Read more >
SOLVED TypeScript Cannot Redeclare Block Scoped ...
Solution for an issue that says cannot redeclare block scoped variable name in TypeScript.
Read more >
Cannot redeclare block-scoped variable? How to resolve
Cannot redeclare block-scoped variable ? The Reason behind the error and the way to resolve it.
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