【问题标题】:Can't Resolve "encoding" Module Error While Using Nextjs-13 + Supabase使用 Nextjs-13 + Supabase 时无法解决“编码”模块错误
【发布时间】:2023-02-20 11:16:30
【问题描述】:

我正在尝试使用 Supabase 从我的表单中插入/收集数据。但是当我编译时我得到编码模块未找到错误。我已经尝试过缓存清理和重新安装 npm 模块。他们也没有用。

项目结构:

apply/page.tsx代码:

"use client"
import { supabase } from "lib/supabaseClient"

export default function Apply() {

    // This function called by button so we use "use client" at top.
    async function createApplyRecord() {
        const { error } = await supabase
            .from('applications')
            .insert({id: 1, fullname: "test", email: "aa", phone: "bb", githuburl: "cc", linkedinurl: "dd", about: "ee"})
            console.log("inserted")
            if(error) {
                console.log(error);
            }
    }

  return (SOME HTML CODE HERE)
}

我得到的错误:

【问题讨论】:

  • 在黑暗中拍摄,但也许您的节点版本已关闭?可能值得将其更新到最新版本。
  • 它是最新的。我尝试过 LTS 和实验版。他们都没有改变任何东西。

标签: typescript npm next.js supabase


【解决方案1】:

这只是一个可以安全忽略的警告。我们正在努力将其移除。您可以在这里关注:https://github.com/supabase/supabase-js/issues/612

【讨论】:

    猜你喜欢
    • 2018-10-26
    • 2022-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-24
    • 2017-05-10
    • 2016-07-16
    • 2016-02-01
    相关资源
    最近更新 更多