8000 system-config.ts not es6 compatible (?) · Issue #758 · angular/angular-cli · GitHub
[go: up one dir, main page]

Skip to content
system-config.ts not es6 compatible (?) #758
Closed
@mark1010

Description

@mark1010

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    OSX 10.11.4
  2. Versions. Please run ng --version. If there's nothing outputted, please
    run in a Terminal:
    node --version
    And paste the result here.

angular-cli: 1.0.0-beta.1
node: 6.1.0
os: darwin x64

  1. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
  • build 'virgin' app:ng new my-app
  • change tsconfig.json: "target":"es5" to "target":"es6"
  • run: ng serve --port 4201 --live-reload-port 49153
  1. The log given by the failure. Normally this include a stack trace and some
    more information.

Visual Studio Code indicates:
'Cannot redeclare block scoped variable'... for all 'consts' in system-config.ts.

App builds but fails to run in Chrome:
zone.js:323 Error: ReferenceError: cliSystemConfigPackages is not defined(…) ZoneDelegate.invoke @ zone.js:323 Zone.run @ zone.js:216 (anonymous function) @ zone.js:571 ZoneDelegate.invokeTask @ zone.js:356 Zone.runTask @ zone.js:256 drainMicroTaskQueue @ zone.js:474 ZoneTask.invoke @ zone.js:426

  1. Mention any other details that might be useful.

Fixed by changing all const declarations in system-config.ts to var.

const map: any... -> var map:any..

const cliSystemConfigPackages: any = {}; -> var cliSystemConfigPackages: any = {};


Thanks! We'll be in touch soon.

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

      0