npm throws an error in this situation because it doesn't consider 19.0.0-rc.*
to be >=16.8.0
. The maintainers recommend sticking with Next.js 14 and React 18 until the stable version of React 19 is released. Check out this GitHub PR for more details.