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.

ngDevMode redeclare

See original GitHub issue

Error given by angular-cli.

ERROR in node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11): error TS2451: Cannot redeclare block-scoped variable 'ngDevMode'.
node_modules/@zxing/ngx-scanner/node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11): error TS2451: Cannot redeclare block-scoped variable 'ngDevMode'.

The problem probably is the Angular is also installed in the node_modules of ngx-scanner module, and they are colliding.

Version: 1.0.0-dev.759282

On windows machine removing the node_modules/@zxing/ngx-scanner/node_modules folder solved the problem. Under linux on CircleCI there was no problem.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
csutorasrcommented, Feb 26, 2018

I close this, as it has worked with the latest version.

0reactions
lock[bot]commented, Aug 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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 >
error TS2451: Cannot redeclare block-scoped variable ...
error TS2451: Cannot redeclare block-scoped variable 'ngDevMode' #21670 ... I have a similar and maybe related problem with ngDevMode .
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 ...
I need senior developer with experience in Node and Express. My current project works well on node 14. But after upgrading node to...
Read more >
Flexmonster with angular 6
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 >

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