angularjs – 在compiler_1中获取ERROR.StaticSymbolResolver在构建angular js app时不是构造函数

前端之家收集整理的这篇文章主要介绍了angularjs – 在compiler_1中获取ERROR.StaticSymbolResolver在构建angular js app时不是构造函数前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_403_6@ 运行ng build命令时出现以下错误

chunk {3} inline.bundle.js,inline.bundle.map (inline) 0 bytes [entry] [rende
red]
ERROR in compiler_1.StaticSymbolResolver is not a constructor

我的配置如下:

angular-cli: 1.0.0-beta.24
node: 6.9.2
os: win32 x64
@angular/common: 2.3.1
@angular/compiler: 2.3.1
@angular/core: 2.3.1
@angular/forms: 2.3.1
@angular/http: 2.3.1
@angular/platform-browser: 2.3.1
@angular/platform-browser-dynamic: 2.3.1
@angular/router: 3.3.1
@angular/compiler-cli: 2.4.1

请告知根本原因是什么.

解决方法

https://github.com/angular/angular-cli/issues/3727所述,这是由于版本不匹配造成的.

确保您的配置具有与以下相同的库和版本(这是package.json ng init将生成):

"dependencies": {
  "@angular/common": "^2.3.1","@angular/compiler": "^2.3.1","@angular/core": "^2.3.1","@angular/forms": "^2.3.1","@angular/http": "^2.3.1","@angular/platform-browser": "^2.3.1","@angular/platform-browser-dynamic": "^2.3.1","@angular/router": "^3.3.1","core-js": "^2.4.1","rxjs": "^5.0.1","ts-helpers": "^1.1.1","zone.js": "^0.7.2"
},"devDependencies": {
  "@angular/compiler-cli": "^2.3.1","@types/jasmine": "2.5.38","@types/node": "^6.0.42","angular-cli": "1.0.0-beta.24","codelyzer": "~2.0.0-beta.1","jasmine-core": "2.5.2","jasmine-spec-reporter": "2.5.0","karma": "1.2.0","karma-chrome-launcher": "^2.0.0","karma-cli": "^1.0.1","karma-jasmine": "^1.0.2","karma-remap-istanbul": "^0.2.1","protractor": "~4.0.13","ts-node": "1.2.1","tslint": "^4.0.2","typescript": "~2.0.3"
}

猜你在找的Angularjs相关文章