【问题标题】:Error API body type after build with node adapter使用节点适配器构建后的错误 API 正文类型
【发布时间】:2021-09-09 11:00:24
【问题描述】:

我在 SvelteKit + ts 上的应用。我构建npm run build(节点适配器),使用npm run preview(和npm run dev)一切正常。使用节点构建

export async function post ({body}) {
   try {
     const login = body.get ('login');
error TypeError: body.get is not a function.
Content-Type request: application / x-www-form-urlencoded. Body is Uint8Array(34) in building app.

据我了解,您需要在某处搞砸预兆解析器。或者如何解决?

谢谢!

【问题讨论】:

    标签: node.js svelte sveltekit


    【解决方案1】:

    更新 @sveltejs/kit 到 1.0.0-next.165 修复它 =)

    【讨论】:

    • 请添加更多详细信息以扩展您的答案,例如工作代码或文档引用。
    猜你喜欢
    • 1970-01-01
    • 2019-12-01
    • 1970-01-01
    • 2022-06-23
    • 2016-12-21
    • 1970-01-01
    • 2018-05-22
    • 2018-01-27
    • 2017-09-18
    相关资源
    最近更新 更多