我像这样更新,在这里找到
在 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
昨晚。现在,当我单击链接而不是加载模块(我是延迟加载)时,它告诉我找不到模块。
错误
ZoneAwareError {__zone_symbol__error:错误:未捕获(承诺中):错误:找不到模块'./benefits/benefits.module'。错误:不能……}
有没有其他人分享过这种情况或有任何线索如何解决这个问题,甚至如何解决它?我以为没有重大变化Angular 4
?
代码示例
包.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": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/platform-server": "^4.0.0",
"@angular/router": "^4.0.0",
"angular2-jwt": "^0.1.28",
"angular2-signaturepad": "^2.2.0",
"auth0-lock": "^10.5.0",
"core-js": "^2.4.1",
"ng2-bootstrap": "^1.3.3",
"ng2-charts": "^1.5.0",
"ng2-toasty": "^2.5.0",
"rxjs": "^5.2.0",
"typescript": "^2.2.1",
"zone.js": "^0.7.6"
},
"devDependencies": {
"@angular/cli": "1.0.0-beta.32.3",
"@angular/compiler-cli": "^2.4.0",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0-beta.4",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-coverage-istanbul-reporter": "^0.2.0",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.4.2",
"typescript": "~2.2.1"
}