一、问题:
使用rxjs
里Observable.of
方法时报错:
1 2 3 4 5 6 7 8 9 10 |
[11:19:12] Using gulpfile H:\project\web\demo\gulp\gulp-admins\tools\gulpfile.js [11:19:12] Starting 'observableTask'... [11:19:12] 'observableTask' errored after 8.78 ms [11:19:12] TypeError: Observable.of is not a function at observableTask (H:\project\web\demo\gulp\gulp-admins\tools\gulpfile.js:58:21) at taskWrapper (H:\project\web\demo\gulp\gulp-admins\tools\node_modules\undertaker\lib\set-task.js:13:15) at bound (domain.js:395:14) at runBound (domain.js:408:12) at asyncRunner (H:\project\web\demo\gulp\gulp-admins\tools\node_modules\async-done\index.js:55:18) at process.internalTickCallback (internal/process/next_tick.js:70:11) |
二、解决:
1 |
const { Observable } = require('rxjs/Rx') |