Next.js Discord

Discord Forum

Encountered two children with the same key

Unanswered
kkkotiqqq posted this in #help-forum
Open in Discord
I have 2 errors
app-index.js:31 Warning: Encountered two children with the same key, 0. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
Warning: Encountered two children with the same key, 1. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.

but I can't figure out where they are coming from, the project has almost just been created. I don't understand how to track it

22 Replies

what did you write at app-index.js:31?
@aardani what did you write at app-index.js:31?
this is not my function, some kind of built-in from next js apparently
what version of next.js are you using? check by typing npx next info
@aardani what version of next.js are you using? check by typing `npx next info`
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Pro
Binaries:
Node: 20.9.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 14.0.1
eslint-config-next: 13.5.2
react: 18.2.0
react-dom: 18.2.0
typescript: 5.2.2
Next.js Config:
output: N/A
dang i also cant understand how to track it
reproduction step?
what template did you use
@aardani what template did you use
simple next js starter.. i think I will try to update the nextjs version, if the error remains, I will recreate the project completely, I do not understand where this came from at all
@aardani yes but what command did you use :v
this error still remain even if I delete all the components from the page, rebuild the project, reset the cache, and so on 🙂
@aardani yes but what command did you use :v
can you please explain why next js compiling errors? at the initial stage, this is not the case, only after creating some new components
@aardani i cant if you dont answer my question :D
this question not about a specific error, I have already created a new project, and this has continued in it
well
so far i dont have ways to reproduce the bug
and i dont see any code
so i dont know how i can help you
@aardani so i dont know how i can help you
the question is, in normal behavior, next should not compile /_error? 🙂
@kkkotiqqq the question is, in normal behavior, next should not compile /_error? 🙂
they are compiled to display the error message on the browser when developing
if your code has error
then its a normal behavior to compile /_error