angular 升级后出现这个问题 解决办法在后面
ERROR in node_modules/rxjs/Subscription.d.ts(1,15): error TS2307: Cannot find module ‘rxjs-compat/Subscription’.
Date: 2018-10-23T03:44:40.260Z
Hash: 7c3c640fdb9f230705d2
ERROR in node_modules/rxjs/Subscription.d.ts(1,15): error TS2307: Cannot find module ‘rxjs-compat/Subscription’.
Time: 13045ms
chunk {main} main.js, main.js.map (main) 1.92 kB [initial] [rendered]
src/app/car-edit/car-edit.component.ts(3,10): error TS2305: Module ‘”/Users/yt/dev/admin_angular_springboot/client/node_modules/rxjs/Subscription”‘ has no exported member ‘Subscription’.
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 691 bytes [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 76.8 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 326 kB [initial] [rendered]
ℹ 「wdm」: Failed to compile.
解决办法:
替换原内容:
import {BehaviorSubject} from ‘rxjs/BehaviorSubject’;
rxjs 6.x
替换的内容:
import {BehaviorSubject} from ‘rxjs’;
更多解释可以查看