Category "next.js"

How can I pass routes in Next.js?

I'm trying to pass routes to my Next.js app but it's returning an error, I've looked everywhere but I can't find the answer. _App.tsx import Routes from './

TypeError _this2.flipBook.getPageFlip is not a function

I used to use react-pageflip on Reactjs exactly like the code below and it worked fine. When I copied the same component, I got this error in the nextjs project

Connect Shopify Polaris links with Nextjs Links

When using Shopify Polaris, many internal components output a single static <a /> tag, this breaks my NextJS app experience since clicking on the link rel

Error: write EPROTO 4455222784:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:

I have a websocket server running on the backend using the ws nodejs library. I'm getting this error whenever I am trying to connect to it from the client side.

NextJs - Link to scroll to a section in same page

I'm using NextJs. I would like to create a link in my header section. This link should take the user to TestimonialsSection on the same page by scrolling.

How to set status code 404 instead of 200 for 404-page in Next.js

I have inquired about the way of setting 404 status code to 404-page in Next.js but the response I was given was that this is not true, that the status code is

Redirect based on header OR cookie in Next.js next.config.js

We're using Next.js and want to route all paths (not just root) to locale-based paths based on the browser Accept-Language header. However, if the user SETS the

Redirect based on header OR cookie in Next.js next.config.js

We're using Next.js and want to route all paths (not just root) to locale-based paths based on the browser Accept-Language header. However, if the user SETS the

How to make infinite scroll on Next.js static page?

I'm making portfolio using Next.js and count of projects on page is big enough. I want to start loading images when they get into the current viewport. Such sce

react-suneditor css not loading on production

I set up react-suneditor just as it said in the docs, using dynamic loading since I'm using Next.js. import React from 'react'; import dynamic from "next/dynami

How to import SVG into Next.js component?

I am trying to import an SVG image from file into a Next.js component. In the assets folder I have google.svg (icon): <svg className="svgIcon-use" width="25"

Parsing error : Cannot find module 'next/babel'

I have been encountering this error on every single new Next.js project that I create. The page can be compiled without any problem, it just keeps on showing as

Apollo `useMutation()` stuck loading inside Next.js component

The following form component in Next.js submits without errors but never completes the mutation. Instead it get's stuck in the loading state. import React, { us

next/image loads very big images

I am using Next js in my project and using next/image for loading images. My page is roughly 1600px wide and has 3 thumbnails per row which are of 500px in widt

Next.js dynamic import with server-side-rendering turned off not working on production build

I'm currently building a site using the leaflet package. This package however needs the window object. That's why I'm importing a component made with leaflet as

How to test _document in Next using Jest

I'm trying to achieve 100% coverage in a project and this is the only file I can't test because I haven't got any idea of how to do it. I don't even know where

Docker Image for NextJs ClientApp failing with an error Cannot find module '/app/server.js'

I am trying to create docker image for my nextjs application. It is working well in my local. My local node version is 16.14.0 My local nextjs version is 12.x

dynamic import Next.js but still see the module in bundle

I'm setting a component as dynamically callable: index.tsx import dynamic from "next/dynamic"; import { PhoneNumberInputProps } from "./components/PhoneNumberIn

Error 404 when you refresh a Next.js page

I am getting this error whenever I try to refresh a routed page in my small Next.js app.

Why is Woff file downloading instead of just Woff2? Google Fonts/NextJS

NextJS has font-optimization for Google Fonts where it downloads the font-face definition from Google Fonts (with both a Chrome and an IE User Agent) and places