I'm trying to use Supabase for inserting/collecting data from my form. But when I compile I got encoding module is not found error. I already tried cache cleaning and re-installing npm modules. They didn't work either.
Project Structure:
apply/page.tsx Code:
"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)
}
Error I Got:
This is just a warning that can be safely ignored. We're working on removing it. You can follow along here: https://github.com/supabase/supabase-js/issues/612
To fix this, I ran npm install encoding and the error was gone!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With