@Marinette This isn’t specific to running your build on Netlify, your project is just broken.
Running your repo I see exactly the same issue with npm run build && npx serve -s dist
and with npm run dev
Runing locally via npm run dev
provides better error messages:
I’m not going to dig in too deeply but it seems to need React
to be available in the context of your various components, and it isn’t.
I was able to get your site to execute with no errors by placing import React from 'react'
into each of the components/*.jsx
files.