为什么在Live Vercel网站Put&提取请求导致未来的承诺错误?

发布于 2025-02-03 04:21:59 字数 435 浏览 3 评论 0原文

我遇到了一个错误,并感谢一些帮助。

我创建了一个“ CRUD”项目,该项目渲染存储在local Data.json文件中的数据。在Localhost上,我正在使用SWR获取数据。用户能够更新数据并创建新数据。在Localhost上,我能够获取数据并渲染更新/创建的数据。

在实时Vercel站点上,一旦用户尝试更新/创建数据,就会在日志上使用错误消息控制台。


PUT https://feedback-dashboard-morfeli.vercel.app/api/feedback/edit-feedback 

VM2288:1 Uncaught (in promise) SyntaxError: Unexpected end of JSON input
    at [id]-a99fbfe26a07e1bb.js:1:3153

我相信这与代理有关。

I'm running into an error and would appreciate some assistance.

I created a "CRUD" project that renders data stored in a local data.json file. On localhost I am using SWR to fetch the data. User is able to update data and create new data. On localhost I am able to fetch the data and render either the updated/created data.

On the live Vercel site, once the user has tried to update/create data, an error message consoles onto the log.


PUT https://feedback-dashboard-morfeli.vercel.app/api/feedback/edit-feedback 

VM2288:1 Uncaught (in promise) SyntaxError: Unexpected end of JSON input
    at [id]-a99fbfe26a07e1bb.js:1:3153

I believe this has something to do with a proxy.. unsure here..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文