0

I try to deploy my website (Astro + React + Netlify CMS + Tailwind) https://github.com/bernaul/baptiste-clisson

Since i add React on this commit, my deployment fail : https://github.com/bernaul/baptiste-clisson/commit/58754f55618e5c206b2a604614df35c9396520c5

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

enter image description here

I use React 18 and astro-netlify-cms ...

Have you any advice ? Should I externalize "netlify-cms-app" ? How ?

Thank you for your help, Have a nice day

I try to remove react but my application is broken...

Antoine Gervais
  • 331
  • 2
  • 6

1 Answers1

2

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
Antoine Gervais
  • 331
  • 2
  • 6