当看AOT(提前编译)文档https://angular.io/docs/ts/latest/cookbook/aot-compiler.html#!#compile时,有一个依赖于platform-server,目的是什么它?似乎只需要编译器cli来运行编译器工具
我在这里找到了这样的更新
在Linux/Mac上:npm install @ angular/{common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router,animations} @latest typescript @ latest - 保存
当我删除node_modules然后npm install我得到这个,
警告在./~/@angular/core/@angular/core.es5.js 5889:15-36严重依赖:依赖的请求是一个表达式
也许这会帮助别人帮助我.这似乎是ES5的一个问题?
控制台中的当前错误.
背景
我的项目工作正常,直到我升级到Angular 4昨晚.现在,当我点击一个链接而不是加载模块(我是延迟加载)时,它告诉我它找不到模块.
Eror
ZoneAwareError {__zone_symbol__error:错误:未捕获(在承诺中):错误:找不到模块'./benefits/benefits.module'.错误:不能......}
有没有其他人分享这种情况或有任何线索如何解决这个问题,甚至做什么来解决它?我以为没有突破性的变化Angular 4?
代码示例
的package.json
{
"name": "my-web-application",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "ng serve",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^4.0.0",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/compiler-cli": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": …Run Code Online (Sandbox Code Playgroud)