我最近安装了 Angular 4 (RC2) 并从简单的快速入门示例中复制了文件。但是当我尝试使用 Webpack 构建项目时,我收到错误消息,指出无法解析 Rxjs:
WARNING in ~/@angular/core/@angular/core.es5.js
6857:19-40 Critical dependency: the request of a dependency is an expression
WARNING in ~/@angular/core/@angular/core.es5.js
6883:19-106 Critical dependency: the request of a dependency is an expression
ERROR in ~/@angular/core/@angular/core.es5.js
Module not found: Error: Can't resolve 'rxjs/Subject' in 'node_modules/@angular/core/@angular'
@ ~/@angular/core/@angular/core.es5.js 26:0-39
@ ./app/app.module.ts
@ ./main.ts
ERROR in ~/@angular/core/@angular/core.es5.js
Module not found: Error: Can't resolve 'rxjs/observable/merge' in 'node_modules/@angular/core/@angular'
@ ~/@angular/core/@angular/core.es5.js 23:0-46
@ ./app/app.module.ts
@ ./main.ts
ERROR in ~/@angular/core/@angular/core.es5.js
Module not found: Error: Can't resolve 'rxjs/operator/share' in 'node_modules/@angular/core/@angular'
@ ~/@angular/core/@angular/core.es5.js 24:0-44
@ ./app/app.module.ts
@ ./main.ts
ERROR in ~/@angular/core/@angular/core.es5.js
Module not found: Error: Can't resolve 'rxjs/symbol/observable' in 'node_modules/@angular/core/@angular'
@ ~/@angular/core/@angular/core.es5.js 25:0-54
@ ./app/app.module.ts
@ ./main.ts
ERROR in ~/@angular/core/@angular/core.es5.js
Module not found: Error: Can't resolve 'rxjs/Observable' in 'node_modules/@angular/core/@angular'
@ ~/@angular/core/@angular/core.es5.js 22:0-45
@ ./app/app.module.ts
@ ./main.ts
我已经安装了 Rxjs 5.0.1,我认为这是 Angular 所期望的版本。我想不出还有什么可做的。