[vite]: Rollup failed to resolve import "netlify-cms-app"

I try to deploy my website (Astro + React + Netlify CMS + Tailwind)

Since ii add React on this commit, my deployment fail :

I don’t understand the error :

12:52:58 AM: building client
12:52:58 AM: [vite]: Rollup failed to resolve import “netlify-cms-app” from “virtual:astro-netlify-cms/user-config”.
12:52:58 AM: This is most likely unintended because it can break your application at runtime.
12:52:58 AM: If you do want to externalize this module explicitly add it to
12:52:58 AM: build.rollupOptions.external

I use React 18 and astro-netlify-cms …

Thank you for your help,
Have a nice day

one quick fix: downgrading to React 17 and installing netlify-cms-app as a direct dependency does seem to fix this:

npm i {,@types/}{react,react-dom}@^17 netlify-cms-app

thanks for sharing your solution! @bernaul