Category "next.js"

WpGraphQL query returns null

I'm having this GraphQL query from headless Wordpress in Nexjs via WpGraphQl plugin: export const GET_POSTS_BY_CATEGORY_SLUG = gql` query GET_POSTS_BY_CATEGORY

how to get rid of CORS error with mailchimp API?

How to deal with CORS error with mailchimp API? or what is the problem with this code: This is using mailchimp package: import mailchimp from '@mailchimp/mailch

next.js iron-session req.session.user is undefined

I'm making a dashboard for my team's bot using next.js and iron-session. However, when I save the session and check it, req.session.user is undefined. How can I

How to reduce bundle size of first load page in Next.js? [duplicate]

I have a very big bundle size of one of my pages. How can I improve the first loading of the page in Next.js? Pls take a look on screenshot

Should all fetching be done inside getStaticProps in NextJS?

In NextJS in order to utilize static site generation, I need to perform all network requests inside getStaticProps. I've removed all the fetch calls in my React

EBADPLATFORM error when installing any npm package into a fresh Nextjs app

Working with a team on a new project -- we have a fresh Nextjs app stood up in our remote repo which another team member has cloned and is working on locally. S

Open messenger with product info

I have searched for this feature, but I'm not sure if it is possible and maybe someone has done this before. I would like to integrate chat messenger (facebook)

Storybook error when using Webpack5 with Next.JS app + Typescript

I am trying to set up a fresh next.js app using Typescript and Storybook. Following some guides online gets me fairly close but I note that the rendered 'HomePa

Why is my favicon not working in my next js app?

For some reason my favicon is not working. I have the favicon saved as favicon.ico in the /public directory and am referencing it in the <Head> of my pag

Message 'Caching failed for pack: Error: Unable to snapshot resolve dependencies' when creating a nextjs application

I tried to create a nextjs application; when i run npm run dev, i got the following error message: <w> [webpack.cache.PackFileCacheStrategy] Caching faile

How can I set a flash variable in Next.js before a redirect?

Laravel in PHP made this easy with https://laravel.com/docs/9.x/session#flash-data, so I figured Next.js would have an easy way too. I thought I'd be able to do

Vercel: Task timed out after 10.01 seconds

I recently deployed a Next.js application for a software engineering boot camp. I am using Vercel for hosting the web app. The problem I am having has been spok

NextJS - Appending a query param to a dynamic route

In my NextJS app, I have a language selector that's visible on every page. When I select a new language, I just want to replace the current URL by appending a q

Digital Ocean App build error with NextJS imports/exports

I have a problem with building app process in Digital Ocean, I have an app already deployed and I have implemented a big refactor in the code structure, in my l

NextJS: Main and Nextscript

Exploring NextJS a bit for its server side rendering features. It looks really nice and easy to use. I already explored the _document.js file which we can inclu

useRouter/withRouter receive undefined on query in first render

I got a problem with my dynamic route. It look like this [lang]/abc I am trying to get query value from [lang] but when I using useRouter/withRouter i got qu

Storybook throws an error when I want to install it with Next

Storybook throws this error when I am trying to install with a Next.js app which already exists: • Detecting project type. ✓ • Adding Storyb

API resolved without sending a response in Nextjs

I have to make same changes in my nextjs project because my enpoint API doesn't support many calls and I would like to make a refresh from the original data eve

Can i use my own sign in form for aws cognito?

I have a nextjs app that use aws cognito for auth. i was wondering if there is a way to replace the hosted ui provided by aws with my own custom form. import {

Next.js overlaps static route with dynamic route

I am using Next.JS application routing system. I have created a dynamic route with structure like pages/[country]/[language]/index.js. Also there is a static ro