All Questions
Tagged with next.js14 server-action
8 questions
0
votes
0
answers
76
views
Argument of type Buffer is not assignable in writeFile
I am trying to upload image in local file system using next.js 14 in a server action file.
But writeFile function from "fs/promises" is not taking Buffer as second argument.
Here is my code ...
4
votes
5
answers
2k
views
Getting error: Failed to parse body as FormData in Next.js 14 app router
I have a Next 14 app router project, so the problem is in the dashboard page and in a more clear way in the add and update form, I'm using Formik to handle the forms and then I send the data as ...
0
votes
0
answers
315
views
Next.js serverAction passing data to the action
I got stuck with the serverAction in Next.js 14 with app router. I want to pass directly some information from my server-side page to the server-side action. Or at least I want to find a way to access ...
1
vote
0
answers
152
views
Progress Bar With Server Actions
I am making a multiple file upload for learning. The main logic is done so far but in the front end I want to make some user feedback and trying to make a progress bar. In client-side I've made ...
2
votes
0
answers
713
views
Nextjs 14 + Server actions + React Query 5: How to handle query inside generateMetadata?
I've followed this approach : https://tanstack.com/query/v5/docs/framework/react/guides/advanced-ssr
But I'm not sure how to do If I need to make a query inside generateMetadata
Here is how I do:
// ...
0
votes
0
answers
55
views
Why is my client component unable to retrieve the correct error that was thrown from my server action?
I have a client component Form (activate-form.tsx) for new users to attach a username and name to their account when they first log in and authorize the app via NextAuth's Google OAuth provider.
I'm ...
4
votes
0
answers
572
views
How to handle multipart formData in next.js 14 server actions
Here is my Next.js page.jsx file code where i handle a form file using browser new FormData() web api and this uploadImageConverter function is a server actions function.
"use client"
...
0
votes
1
answer
185
views
sql.js throwing a "TypeError: Cannot set properties of undefined (setting 'exports')" in NextJS
I am trying to use sql.js to execute some sql code on the web using NextJS. So I created this server action function that just initializes the sql.js database.
'use server';
import initSqlJs from '...