使用Node JS和parse-server open source时parse4cn1有一些问题 [英] parse4cn1 has some issue when working with Node JS and parse-server open source

查看:61
本文介绍了使用Node JS和parse-server open source时parse4cn1有一些问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

parse4cn1 库在 parse.com 上运行良好,但是在与 Node 4.3.2 parse一起使用时存在一些问题-服务器开源。例如,当调用 ParseUser.signup()函数时,总是会发生 无效密钥名称 异常。我尝试调试并弄清楚 ParseCommand 对象应在其标头中添加 ParseConstants.CONTENT_TYPE_JSON ,以使其能够正常工作。我不是为什么,因为如果不使用 parse.com 仍然可以使用它。

The parse4cn1 library works well with parse.com but it has some issues when working with Node 4.3.2 and parse-server open source. For example, when calling the ParseUser.signup() function, the "Invalid key name" exception is always happened. I tried to debug and figure out that the ParseCommand object should add the ParseConstants.CONTENT_TYPE_JSON to its header in order to make it can work. I don't why because it still works without doing this with parse.com.

另一个问题是 ParseQuery.find( )在使用 ParseQuery.whereContainedIn()时总是失败。服务器异常为 ParseException [code = 102,msg =参数编码不正确,cause = null] 。我猜在这种情况下,该参数可能也具有 json格式,但我不知道要解决该问题。任何建议表示赞赏。 西迪巴莱,您有什么建议吗?谢谢!

Another issue is the ParseQuery.find() is always failed when using the ParseQuery.whereContainedIn(). The server exception is "ParseException [code=102, msg=Improper encode of parameter, cause=null]". I guess this issue probably regarding the parameter has the json format in this case as well but I don't know to to resolve it. Any advice is appreciate. Sidiabale, do you have any advice? Thanks!

推荐答案

这些问题已在版本3.0 parse4cn1 。显然,Parse Server对指定内容类型标头的要求更为严格,因此以前与Parse.com一起使用的代码不适用于Parse Server。我已经在上述发行版中解决了这些问题。再试一次3.0版,如果遇到任何问题,请通知我。

These problems are solved in version 3.0 of parse4cn1. Apparently, Parse Server is stricter with the need to specify the content-type header so code that previously worked with Parse.com does not work with Parse Server. I've addressed these issues in the aforementioned release. Try again with version 3.0 and let me know if you encounter any issues.

这篇关于使用Node JS和parse-server open source时parse4cn1有一些问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆