Questions tagged [nextjs-app-beta]
10 questions
4
votes
2 answers
Error posting image using formdata: "NotSupportedError: multipart/form-data not supported"
I am using Next.js version 13.4.1 and trying to post a file to the server using multipart/form-data. However, when attempting to do so, I receive an error message stating that the format is not supported. I have seen a few blogs and other developers…

Tom
- 91
- 5
2
votes
0 answers
Await navigation with router from next/navigation
With the old pages router, I could await router.push. I used this to keep a button disabled while we are in the process of navigating to another page:
async function onSubmit(input: CreatePostFormData) {
try {
await…

Florian Walther
- 6,237
- 5
- 46
- 104
2
votes
2 answers
How to start the graphql server in new version of next js 13.2 api route?
Unable to start the server in next js 13.2.
import { ApolloServer } from '@apollo/server';
import { startServerAndCreateNextHandler } from '@as-integrations/next';
const resolvers = {
Query: {
hello: () => 'world',
},
};
const typeDefs =…

Raja Jayaraman
- 23
- 3
2
votes
0 answers
Is there a way to access the "request" and "response" within a server side layout, page or component in nextjs13's app directory?
I'm trying to apply server side authentication in a similar way to how getServerSideProps() works in the older /pages approach to nextjs.
However with this approach getServerSideProps takes a context parameter which contains both the req and res…

Tristan Trainer
- 2,770
- 2
- 17
- 33
1
vote
1 answer
Error: ENOENT: no such file or directory, mkdir '/workspace/.next'
deploying nextjs app to GCP app engine I got two errors:
[Error: ENOENT: no such file or directory, mkdir '/workspace/.next']
"This request caused a new process to be started for your application, and thus caused your application code to be loaded…

Abdulsalam Al Mahdi
- 31
- 4
0
votes
1 answer
Can I pass data from one page to another as a State using Nextjs 13 App directory
Using Nextjs 13 App Router, I want to pass previewData from MainComponent.jsx to Preview.jsx as a State. not through query or props. I Just want to pass data as a state from MainComponent.jsx and navigate to the Result.jsx
receive the state data and…

Auvee
- 95
- 2
- 15
0
votes
1 answer
NextJS app folder api endpoint returns error 500, with no visible error
So I'm trying to create a proxy endpoint to obfuscate the real backend. My frontend is NextJS project and backend is Strapi app. And I'm trying to set up user registration. I have a /app/api/auth/register/route.js which will take the incoming…

Odif Yltsaeb
- 5,575
- 12
- 49
- 80
0
votes
0 answers
How to implement conditional 'go back' button in nextjs 13
I have a webview app that has a header component on each page, the header should render <- (go back button) if user is not on the home page and have the name of that page
if I add this header component in the layout.ts how do I change the "name" for…

Zhunus Gaziz
- 33
- 1
- 4
0
votes
0 answers
Global refresh button for multiple client-side components
I'm creating an app in Nextjs 13 with the new app structure.
This means I try to use server-side rendering as much as possible.
For the moment I have a structure like below:
Blue is for server-side components that fetch the data with await…

roeland
- 6,058
- 7
- 50
- 67
-3
votes
1 answer
In NextJs, how do I make a routing system similar to stackoverflow
I want the routes to work in a way that:
Visiting www.example.com/blog/12345 should redirect to www.example.com/blog/12345/this-is-a-test.
Visiting www.example.com/blog/12345/this-a-some-random-text-blahblahblah should also redirect to…

Sheikh Ameen
- 25
- 4