Skip to content

Initializers are not allowed in ambient contexts #5693

@carlosfaria94

Description

@carlosfaria94
- [x] bug report
- [ ] feature request

Versions.

@angular/cli: 1.0.0
node: 6.10.0
os: darwin x64
@angular/common: 4.0.0
@angular/compiler: 4.0.0
@angular/core: 4.0.0
@angular/forms: 4.0.0
@angular/http: 4.0.0
@angular/material: 2.0.0-beta.2
@angular/platform-browser: 4.0.0
@angular/platform-browser-dynamic: 4.0.0
@angular/router: 4.0.0
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.0

Repro steps.

After migrating to 1.0 and doing ng serve I obtain the error: Initializers are not allowed in ambient contexts.

The log given by the failure.

ERROR in /*/node_modules/@angular/core/src/errors.d.ts (9,33): Initializers are not allowed in ambient contexts.
/*/node_modules/@angular/core/src/errors.d.ts (10,43): Initializers are not allowed in ambient contexts.
/*/node_modules/@angular/core/src/errors.d.ts (11,42): Initializers are not allowed in ambient contexts.
/*/node_modules/@angular/core/src/errors.d.ts (12,43): Initializers are not allowed in ambient contexts.
/*/node_modules/@angular/core/src/errors.d.ts (13,35): Initializers are not allowed in ambient contexts.

ERROR in /*/node_modules/@angular/core/src/animation/dsl.d.ts (34,33): Initializers are not allowed in ambient contexts.

ERROR in /*/node_modules/@angular/core/src/animation/animation_metadata_wrapped.d.ts (12,33): Initializers are not allowed in ambient contexts.

ERROR in /*/node_modules/@angular/http/src/backends/browser_jsonp.d.ts (1,33): Initializers are not allowed in ambient contexts.

ERROR in /*/node_modules/@angular/router/src/shared.d.ts (15,37): Initializers are not allowed in ambient contexts.

ERROR in /*/node_modules/@angular/common/src/platform_id.d.ts (8,42): Initializers are not allowed in ambient contexts.
/*/node_modules/@angular/common/src/platform_id.d.ts (9,41): Initializers are not allowed in ambient contexts.
/*/node_modules/@angular/common/src/platform_id.d.ts (10,45): Initializers are not allowed in ambient contexts.
/*/node_modules/@angular/common/src/platform_id.d.ts (11,44): Initializers are not allowed in ambient contexts.

ERROR in /*/node_modules/@angular/platform-browser/src/dom/dom_renderer.d.ts (14,41): Initializers are not allowed in ambient contexts.

ERROR in /*/node_modules/@angular/forms/src/model.d.ts (6,28): Initializers are not allowed in ambient contexts.
/*/node_modules/@angular/forms/src/model.d.ts (10,30): Initializers are not allowed in ambient contexts.
/*/node_modules/@angular/forms/src/model.d.ts (15,30): Initializers are not allowed in ambient contexts.
/*/node_modules/@angular/forms/src/model.d.ts (20,31): Initializers are not allowed in ambient contexts.

ERROR in /*/node_modules/@angular/compiler/src/util.d.ts (8,36): Initializers are not allowed in ambient contexts.

ERROR in AppModule is not an NgModule

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions