Questions tagged [next]
Coming immediately after in a sequence; subsequent. Often refers to iterators that provide next() and hasNext() methods. Please, do not use this tag for Next.js related questions (use [next.js] instead).
1,697
questions
0
votes
1
answer
14
views
Fetching data in NextJS using getServerSideProps returns Promise {<pending>}
I am trying to fetch data in NextJS using getServerSideProps inside my component but it only returns Promise {}. I don't know what I am doing wrong. Here is my code:
const MyHomeComponent = () =>{
...
0
votes
0
answers
21
views
How to fix cors issue for images in nextjs
i'm rather new to nextjs and cors is giving me a headache.
I am trying to use the flagsapi.com API to add flags to a component.
and it does not work, I get the following error:
Access to image at '...
0
votes
0
answers
13
views
Open modal window with the required data in NextJS
I use NextJS framework. How can I open a modal window with full data? The data in which should change depending on the object ID. Data will be fetched from a JSON file.
const JSONUrl = 'file.json';
...
0
votes
0
answers
27
views
Invalid hook call trying to migrate project from React to Next.js
I am trying to migrate my React project to Next.js.
No matter what I do I keep getting this error below *.
I have some questions about it:
Can this occur because of styled components like this (...
0
votes
0
answers
7
views
In despair, how to route a React app with Next.js
I am new to Next.js. I have my index.js in the Pages folder and 3 other files in a component folder under Pages. In that folder, I have a Signup.js, Signin.js and a Lostpassword.js. What I am trying ...
-2
votes
0
answers
13
views
why the float-right or float-end dont work?
enter image description here
hello,
im using bootstrap and i m trying to move the username in right but it doesn't work and this is the code enter image description here
any help ?
i expect to move ...
-1
votes
1
answer
17
views
Next js how to render item array with the same name as an import
I'm tryed render item array with the same name as an import without success, as per the code below.
Does anyone have an idea? thanks!
This test does not work.
import _01 from './components/01.js'
...
0
votes
0
answers
9
views
Displaying News Teasers in Storyblok with getStaticProps. And only call API when the block "NewsOverview" is in use
I have created some News-pages in the "News" folder. I want to tease the news on the home and on some other pages. So i have already achieved to get all news in the getStaticProps. But know ...
0
votes
1
answer
29
views
openssl Error Stack error : 03000086: digital envelope routines :: initialization error
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node....
0
votes
0
answers
18
views
Problem with next-js when link to another page
I have a problem with next js, when I link to another page works fine but when I come back to the home page, I'm not came back to the same location that I was before...
So expected, when I came back ...
0
votes
1
answer
41
views
How to POST mulitpart/form-data in javascript
In my frontend I'm using input[type='file'] to get image data from the users, and POST to my API. In the backend, I'm parsing the data using formidable. The issue is that uploadImage Api returns input ...
0
votes
0
answers
13
views
How to connect Sequelize with mysql2 in NextJS. UnExpected error occured
I cant understand this error. I spend a lot of time on this. I am new in Next.Js and using sequelize for mysql. This error has been occured on connection.
I tried to connect with mysql2 with sequelize ...
0
votes
0
answers
21
views
How can we optimise css in a NextJS - Material UI app?
The google core web vitals complain about not having the CSS optimised.
Two main points -
Reduce unused CSS (recommendation for both mobile and desktop)
Minify CSS (recommendation for mobile devices)
...
0
votes
0
answers
53
views
TypeError: window.__TAURI_IPC__ is not a function on Tauri
I got TypeError: window.TAURI_IPC is not a function when i use revoke imported from "@tauri-apps/api/tauri"
this is my error
i have try to reconfigure my tauri.conf.json
0
votes
0
answers
30
views
Warning: Text content did not match. Server: "March 2023" Client: "marzo de 2023" [closed]
I made an app with next js and api with mongodb, when I start the app it gives me the following error with warning:
Error: Text content does not match server-rendered HTML.
Warning: Text content did ...
0
votes
1
answer
28
views
Spring framework and nextjs axios Data Transfer problem
I want to use Spring and Nextjs for project.
I used to make projects with Spring and React.
Nextjs 13 version provides api/route structrue so it is quite interesting compare with regular React ...
1
vote
1
answer
28
views
api route.ts return Response type with JSON from axios
I want to make MSA so i want to use front server and backend server both.
So frontend calls api/route structure file api. and File api calls backend api with axios.
the problem is return new Response(...
0
votes
0
answers
13
views
Next.js run build and routing issues for static website deployment
Im working on this next.js webpage and I want it so that on npm run build, it will produce a production ready build that can be hosted as any normal vanilla html, js and css built page. As in the out ...
0
votes
0
answers
8
views
An array mapping returns false length even after a use effect until manually refresh the navigator
In Nextjs I call an imported function 'GetURL(props)' passing the Files array previously uploaded to firebase cloud storage.
export default function ImageUploaderComp(props){
const \[RszdCloudImg, ...
0
votes
0
answers
31
views
NextJs middleware Can not read the cookie after set, it needs to reload the page
After setting the cookie, I can not read it in the middleware , I have to reload the page then I can read the cookie.
Why did this happen?
I set cookie like the following:
import { getCookies, ...
0
votes
2
answers
21
views
CORS ISSUE trying to send data to my server
"Access to XMLHttpRequest at 'http://localhost:3000/campgrounds/6411f03e718f68104cac045a' (redirected from 'http://localhost:5000/campgrounds') from origin 'http://localhost:3000' has been ...
0
votes
1
answer
29
views
how to suggest some preloaded text to the user in tiptap text editor?
I want to give suggestions to users when user click on a tip-tap editor. the suggestion will be some preloaded text. if the user like that suggestion then he could be saved that suggestion in his ...
0
votes
1
answer
12
views
I have an error when I try to get target.value from MUI datepicker in Next.js
I am using MUI DatePicker. When I try to get target.value I have this error
Here is my code
<LocalizationProvider dateAdapter={AdapterDayjs}>
<DatePicker
className={Turn.picker}
...
-1
votes
0
answers
12
views
how to use sessions in next js client
I am using client api in next js now I want to use sessions to store user data but i m not getting any solution for it. Here is my login page code.
enter image description here
I tried window....
0
votes
1
answer
8
views
Route alias not working in jest, using Next.js with Typescript
I am working on a Next.js App (v13.2.3) that is using Typescript. I have a path alias configured in tsconfig.json. Any idea on how I can make the jest environment aware of the path alias?
// tsconfig....
-1
votes
1
answer
41
views
how to show a jumping dots animation if the user doesn't write anything in 2 sec tip tap text editor?
I am trying to add dots animation on the tip tap editor. basically, my use case is when the user doesn't write anything then I want to show a dots animation to the user and then load some static ...
1
vote
1
answer
40
views
Access the data passed by a JSON File in NextJS
The following code is working fine...
const [showPosts, setShowPosts] = useState();
async function pullJson() {
const response = await fetch(apiUrl);
const responseData = await response....
1
vote
0
answers
20
views
Next js project server build(jenkins+docker) failed with exit code 1
I am running jenkins build error in my next js project, where as build works fine in local.
package.json structure with next 10.1.3
"node":"16.18.1",
"cross-env": ...
0
votes
0
answers
9
views
Deleting on multiple conditions in Prisma
So I understand that the where clause in Prisma needs a unique input in order to run its delete, but I have used the @@unique function to ensure that multiple conditions need to be columns together ...
0
votes
0
answers
22
views
MUI Button font is not inherited
I have loaded a custom font and use it as Next document describes. Most of the MUI components font inherited from the theme font family, but Button and ToggleButton and some other MUI components are ...
-1
votes
0
answers
47
views
nextJS: 403 error when fetch an api in getserversideProps
When fetch in getServerSideProps, it always return error 403(Forbidden)
Code:
export const getServerSideProps: GetServerSideProps = async (ctx) => {
const { uuid } = ctx.params;
const res = ...
0
votes
1
answer
31
views
how to execute something once when data fetched by SWR is available (useEffect)
suppose I want to execute something once and only one time when SWR fetches the data and it's defined.
const {
data,
isLoading,
mutate,
} = useSWR(`${process.env.BACKEND_BASE_URL}/...
0
votes
0
answers
23
views
White Label on Nextjs
At my current company we are starting to sell our software to another business and government organisations.
What we want to is to find out the right approach for white labeling our next repo, ...
0
votes
0
answers
24
views
How correct make path in github with fs?
const { IncomingForm } = require('formidable');
const fs = require('fs');
const dir = './public/img';
const requestApi = async (req, res) => {
res.setHeader('Access-Control-Allow-Origin', '*');...
-2
votes
0
answers
16
views
Problem with import css in components in Next.js [duplicate]
when I want to create a css file in my components folder, I get an error and it is interesting that I did not get this error when I used the app folder, but when I brought the project to the pages ...
0
votes
0
answers
23
views
Next 13 error node_modules/next/dist/esm/server/web/spec-extension/cookies/serialize.js
My application on next throws errors when the serialize function is used
error - node_modules/next/dist/esm/server/web/spec-extension/cookies/serialize.js (40:0) @ parseCookieString
error - URI ...
0
votes
0
answers
49
views
I am running a nextjs project in vscode. when I do npm run dev its ok in terminal but in browser localhost refused to connect
when I do
npm run dev in my terminal to run a nextjs project,
gives output > client@1.0.0 dev > next dev ready - started server on 0.0.0.0:3000, url: http://localhost:3000
but in browser it ...
0
votes
0
answers
19
views
Why does my Nextjs route parameter sometimes resolve to "null" when it is explicity defined
I noticed that when I go to the route "/stream/[provider]/[streamerId]" in my browser the page loads successfully, but I can also see the page also prints to console a 404 stating that the ...
0
votes
2
answers
41
views
get result of request
I have this:
file accounts.controlles.ts
import { requestT } from "src/service/request.api";
export const getaccounts = async () => {
const response = await requestT({
method:...
0
votes
0
answers
12
views
Unhandled Runtime Error TypeError: (0 , _actions_auth__WEBPACK_IMPORTED_MODULE_2__.default)(...).then is not a function
enter image description here
const { name, email, password, error, loading, message, showForm } = values;
const handleSubmit = e => {
e.preventDefault()
// console.table({ name, email, ...
1
vote
0
answers
17
views
phone number does not get passed to datalayer Squeezely event
We have squeezely implementation added to track few events on our website. Some of them are Standard once while some are custom, but issue is from any of the event we cannot track user's phoneNumber. ...
2
votes
0
answers
28
views
Next js Redirect to other domains Not Working
I can redirect to the path in same domain but enable to redirect if domain is different. This error only occurs on firebase hosting and is working fine on localhost with yarn dev.
code:
const router = ...
0
votes
1
answer
12
views
SQL Replace an ID # of a bottom row to a certain ID # - I and increment all the rest of the rows ID # with 1 starting with the row that carries this
How do I replace in SQL an ID # of a bottom row to a certain ID # - I, and increment all the rest of the rows ID # with 1 starting with the row that carries this ID # -I?
--This is what I tried, and ...
0
votes
0
answers
28
views
next13 state management in the app directory
How to persist data between server components in NEXT13 app directory?
I'm fetching api to check if user is authorized (from cookies saved in login) in the root layout and I want to save the response (...
0
votes
1
answer
127
views
Vercel App Domain as a web domain in facebook app
Hello, I have a vercel app hosted in https://next-ui-integration.vercel.app domain, but when I try to add the domain to my facebook app, because I'll need facebook integration facebook doesn't let me ...
0
votes
1
answer
21
views
Next.js dynamic page not being crawled by SEO
I have a blog website in Next.Js that has a dynamic page for this route: article/[slug]. I'm using this screaming frog to crawl and index the pages and although initially before setting a custom ...
-1
votes
1
answer
39
views
How to use only the css part of tailwind?
I want to get only the css part of tailwind.
Admin can write an article and use all Telwind classes in his article.
On the other hand, Tailwind classes are created during the build of the React ...
-1
votes
0
answers
11
views
Nextjs making ._ files
nextjs project keep making files with ._"filenmame"enter image description here
How do i remove them from creation
0
votes
0
answers
62
views
How to solve next js 13 routing reload problem>
Next js 13 Route reload problem
I am using next js 13 app dir. But when i want to navigate to another page its reload full page. When my site is on locahost its working but, when i deploy it on vercel ...
0
votes
0
answers
38
views
Sanity Data fetching Issue
I created a project in sanity and next js 13 my problem is coming in data fetching data not shows in console.log but in sanity studio I ran the same query and it gives me result but its not showing in ...