语法错误:所请求的模块“ rxjs / ajax”未提供名为“ ajax”的导出

时间:2019-01-02 02:35:08

标签: ajax rxjs

运行import { ajax } from 'rxjs/ajax';时出现以下错误,

(node:8582) ExperimentalWarning: The ESM module loader is experimental.
file:///home/..../foo.mjs:1
import { ajax } from 'rxjs/ajax';
         ^^^^
SyntaxError: The requested module 'rxjs/ajax' does not provide an export named 'ajax'
    at ModuleJob._instantiate (internal/modules/esm/module_job.js:79:21)

1 个答案:

答案 0 :(得分:0)

这是因为Rx.js尚不支持真正的ES模块语法。