Skip to content

Support Angular6 - Cannot redeclare block-scoped variable 'ngDevMode' #4

Open

Description

@ijavid

When using library in a Angular6 project the compilation fails on the following error:
ERROR in node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11): error TS2451: Cannot redeclare block-scoped variable 'ngDevMode'.

Root cause:
The Angular npm packages are read twice.

  • First the projects Angular 6 packages
  • Second angular-inline-editor's dependency (5.2.11)

Please release a new version which supports Angular6

Activity

  1. LouisMarzorati commented on Mar 25, 2019

    @LouisMarzorati

    Late to the party but I was able to get this to work with Angular7 with one exception.
    Adding this to your tsconfig.json under compilerOptions will prevent the Angular npm package from being read twice.

    "paths": {
          "@angular/*": [
               "../node_modules/@angular/*" 
            ]
        }
    

    The only exception is that it will not work with the AoT enabled, have not dug into the why but disabling AoT / build optimizer under the "build" config in the angular.json file.

     "configurations": {
         "production": {
                   ...
                  "aot": false,
                  "buildOptimizer": false,
                   ...
                }
              }
    
  2. leabdalla commented on Oct 7, 2019

    @leabdalla

    Same problem here with angular 7.2.2.
    Your solution didn't worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions