-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Closed
Labels
Image (next/image)Related to Next.js Image Optimization.Related to Next.js Image Optimization.bugIssue was opened via the bug report template.Issue was opened via the bug report template.linear: nextConfirmed issue that is tracked by the Next.js team.Confirmed issue that is tracked by the Next.js team.locked
Description
Link to the code that reproduces this issue
https://github.com/KDederichs/fetch-prio-reproducer
To Reproduce
npm install
jest
Current vs. Expected behavior
jest
console.error
Warning: React does not recognize the `fetchPriority` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `fetchpriority` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
at img
at /Users/USER/source_code/fetch-priority-reproducer/node_modules/next/src/client/image-component.tsx:212:5
at /Users/USER/source_code/fetch-priority-reproducer/node_modules/next/src/client/image-component.tsx:372:5
at Home
4 | describe('Tests', () => {
5 | it('it renders without warning', async () => {
> 6 | const {container} = render(
| ^
7 | <Home/>
8 | )
9 | })
at printWarning (node_modules/react-dom/cjs/react-dom.development.js:86:30)
at error (node_modules/react-dom/cjs/react-dom.development.js:60:7)
at validateProperty$1 (node_modules/react-dom/cjs/react-dom.development.js:3757:7)
at warnUnknownProperties (node_modules/react-dom/cjs/react-dom.development.js:3803:21)
at validateProperties$2 (node_modules/react-dom/cjs/react-dom.development.js:3827:3)
at validatePropertiesInDevelopment (node_modules/react-dom/cjs/react-dom.development.js:9541:5)
at setInitialProperties (node_modules/react-dom/cjs/react-dom.development.js:9830:5)
at finalizeInitialChildren (node_modules/react-dom/cjs/react-dom.development.js:10950:3)
at completeWork (node_modules/react-dom/cjs/react-dom.development.js:22232:17)
at completeUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26632:16)
at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26607:5)
at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26505:5)
at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26473:7)
at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25777:74)
at flushActQueue (node_modules/react/cjs/react.development.js:2667:24)
at act (node_modules/react/cjs/react.development.js:2582:11)
at node_modules/@testing-library/react/dist/act-compat.js:47:25
at renderRoot (node_modules/@testing-library/react/dist/pure.js:180:26)
at render (node_modules/@testing-library/react/dist/pure.js:271:10)
at Object.<anonymous> (app/page.spec.tsx:6:35)
Should be no error there
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8103
Available memory (MB): 16384
Available CPU cores: 8
Binaries:
Node: 20.11.0
npm: 10.2.4
Yarn: 1.22.19
pnpm: 8.15.1
Relevant Packages:
next: 14.3.0-canary.30 // Latest available version is detected (14.3.0-canary.30).
eslint-config-next: N/A
react: 18.3.1
react-dom: 18.3.1
typescript: 5.1.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Image (next/image)
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
will-stone, saifbechan, pete-willard, Babadzhanov, tverdohleb and 43 more
Metadata
Metadata
Assignees
Labels
Image (next/image)Related to Next.js Image Optimization.Related to Next.js Image Optimization.bugIssue was opened via the bug report template.Issue was opened via the bug report template.linear: nextConfirmed issue that is tracked by the Next.js team.Confirmed issue that is tracked by the Next.js team.locked