我试着使用带有observablehq的ramda
这里说https://observablehq.com/@itacirgabral/ramda
去做
R = require('ramda');但是这会产生这个错误:
R = TypeError: `then` expected a Promise, received function () { [native code] }找不到任何解决方案来解决它,有什么想法吗?
发布于 2019-07-15 04:13:04
Ramda0.26中添加的R.then使R对象成为类似Promise的对象,这意味着Promise.resolve()将尝试通过调用then()方法来解决它。R不是一个承诺,为了向JavaScript保证这一事实,R.then被重命名为R.andThen。
请尝试一下这个:
R = require('ramda@0.25.0/dist/ramda.min.js')你可以在这个链接上读到这个问题:https://github.com/ramda/ramda/issues/2751。
https://stackoverflow.com/questions/56313539
复制相似问题