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

使用Next.js 13 + Supabase时无法解析encoding模块错误

编译时出现encoding模块未找到错误,Supabase插入表单数据失败

问题描述

我尝试使用Supabase插入/收集表单数据,编译时却出现encoding模块未找到的错误。已尝试清理缓存并重新安装npm模块,但均未解决问题。

项目结构

项目结构截图

代码片段(apply/page.tsx)

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

export default function Apply() {

    // 按钮触发此函数,因此顶部使用"use client"
    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)
}

错误信息

错误截图

内容的提问来源于stack exchange,提问作者Poyraz HANCILAR

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.31 15:05:43