【问题标题】:MongoDB Stitch client.executeFunction is not a functionMongoDB Stitch client.executeFunction 不是函数
【发布时间】:2017-11-28 02:13:34
【问题描述】:

我正在关注https://docs.mongodb.com/stitch/getting-started/dashboard/ 的仪表板教程 当我尝试绘制数据时出现 Javascript 错误:

Uncaught (in promise) TypeError: client.executeFunction is not a function
    at buildGraph ((index):62)
    at eval ((index):15)
    at <anonymous>

这是由以下行引起的:

client.executeFunction("SalesTimeline", (now - duration), now)

executeFunction 不是客户端中的方法,所以可能客户端实例化的方式不正确,但是,到目前为止,我只是从 MongoDB 中复制了代码,我不知道会出现什么问题。

【问题讨论】:

    标签: mongodb-stitch


    【解决方案1】:

    教程有错误

    <script src="https://s3.amazonaws.com/stitch-sdks/js/library/stable/stitch.min.js"></script>
    

    应该是:

    <script src="https://s3.amazonaws.com/stitch-sdks/js/library/v2/stable/stitch.min.js"></script>
    

    感谢 Mike @ MongoDB 提供解决方案。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-29
      • 1970-01-01
      • 1970-01-01
      • 2020-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多