You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React连接Back4App数据库时出现Invalid JSON控制台错误

React连接Back4App数据库时出现Invalid JSON错误

我正在开发React应用,需要连接Back4App数据库。已经在Back4App控制台创建了Person类,且该类中存在符合查询条件的数据,但发起查询请求后,开发者控制台抛出了Invalid JSON错误。我已经确认Parse初始化步骤是正确的,问题不在这个环节。

错误截图:
Dev console error

我的查询代码如下:

export async function fetchUser() {
    // create your Parse Query using the Person Class you've created
    const query = new Parse.Query('Person');
    // use the equalTo filter to look for user which the name is John
    query.equalTo('name', 'Jakob');
    // run the query
    const user = await query.first();

    return user;
}

恳请各位帮忙排查问题,非常感谢!

内容的提问来源于stack exchange,提问作者Jakob B

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.05 01:05:22