This is not the correct value for the publish directory. As noted in Netlifyâs Create React App and Create React Appâs Netlify documentation, CRA builds to the build directory.
Thus, the correct publish directory value is frontend/build.
ive searched for this error and it seems like my projectid for my sanity backend which i put in my .env file not sure why its not reading it with process.env.REACT_APP_SANITY_PROJECT_ID.
Have you tried setting it as an environment variable via the Netlify UI?
DO NOTE: Your REACT_APP_SANITY_PROJECT_ID and REACT_APP_SANITY_TOKEN are exposed publicly. If you wish to keep these secret (rather than allow every visitor to know them), do check out
Hi, I am learning react and I have just used Netlify to deploy my site. But I am getting a blank page after deploying it. In my local environment I am able to see the app working, but not on Netlify. I used vite for my react app.
I also tried publishing the built site - dist folder in my case. It has connectivity problem to my hosted backend on render. Would you be help me navigate the issue?
The error is I should be able to see some pictures here, which is a get request
My backend is hosted on - https://stylex.onrender.com
and I am able to connect to it locally from my frontend but I see this error from my hosted frontend (also tried hosting frontend on Netlify and I see the same error).
Here is my vite.config.js -
import { defineConfig } from âviteâ;
import react from â@vitejs/plugin-react-swcâ;
Hi there,
As many above I also see blank page when it says that my project is âpublishedâ
Here is the published link: Barretje 1
Here is the github repo: Github repo