ReferenceError:未定义cliSystemConfigPackages

时间:2016-07-12 21:14:10

标签: javascript node.js angular npm zonejs

我开始编写Angular 2,我收到了错误消息, 我看到了这个答案:  Error: ReferenceError: cliSystemConfigPackages is not defined

并没有解决问题。 这是Erorr:

    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:
356Zone.runTask           @ zone.js:256
drainMicroTaskQueue       @ zone.js:474
ZoneTask.invoke           @ zone.js:426

这是我的package.json:

  {
  "name": "ang2-pro",
  "version": "0.0.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "start": "ng serve",
    "postinstall": "typings install",
    "lint": "tslint \"src/**/*.ts\"",
    "test": "ng test",
    "pree2e": "webdriver-manager update",
    "e2e": "protractor"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "2.0.0-rc.4",
    "@angular/compiler": "2.0.0-rc.4",
    "@angular/core": "2.0.0-rc.4",
    "@angular/forms": "0.2.0",
    "@angular/http": "2.0.0-rc.4",
    "@angular/platform-browser": "2.0.0-rc.4",
    "@angular/platform-browser-dynamic": "2.0.0-rc.4",
    "@angular/router-deprecated": "2.0.0-rc.2",
    "@angular/router": "3.0.0-beta.1",
    "es6-shim": "0.35.1",
    "reflect-metadata": "0.1.3",
    "rxjs": "5.0.0-beta.6",
    "systemjs": "0.19.26",
    "zone.js": "0.6.12"
  },
  "devDependencies": {
    "angular-cli": "1.0.0-beta.9",
    "codelyzer": "0.0.20",
    "ember-cli-inject-live-reload": "1.4.0",
    "jasmine-core": "2.4.1",
    "jasmine-spec-reporter": "2.5.0",
    "karma": "0.13.22",
    "karma-chrome-launcher": "0.2.3",
    "karma-jasmine": "0.3.8",
    "protractor": "3.3.0",
    "ts-node": "0.5.5",
    "tslint": "3.11.0",
    "typescript": "1.8.10",
    "typings": "1.3.1"
  }
}

有些人可以帮我解决这个错误吗?

1 个答案:

答案 0 :(得分:0)

我也遇到了这个错误:

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

当我从" es5"更改compilerOptions.target时,我遇到了这个问题。到" es6"在tsconfig.json中。

因此,如果您更改了tsconfig.json的compilerOptions.target,则更改它会解决问题 希望这会对你有所帮助。