RENDER_STATIC_PUBLISH_PATH: unbound variable

Hey all,

I’m trying to deploy a react app as a static site. The deploy fails with this warning: Exited with status 1 while building your code.

Here are the last few lines of the deploy logs:

Oct 25 11:11:58 AM  Compiled successfully.
Oct 25 11:11:58 AM  
Oct 25 11:11:58 AM  File sizes after gzip:
Oct 25 11:11:58 AM  
Oct 25 11:11:58 AM    65.06 kB  build/static/js/main.3ac9a185.js
Oct 25 11:11:58 AM    4.25 kB   build/static/css/main.4389869d.css
Oct 25 11:11:58 AM    1.78 kB   build/static/js/787.28cb0dcd.chunk.js
Oct 25 11:11:58 AM  
Oct 25 11:11:58 AM  The project was built assuming it is hosted at /.
Oct 25 11:11:58 AM  You can control this with the homepage field in your package.json.
Oct 25 11:11:58 AM  
Oct 25 11:11:58 AM  The build folder is ready to be deployed.
Oct 25 11:11:58 AM  You may serve it with a static server:
Oct 25 11:11:58 AM  
Oct 25 11:11:58 AM    npm install -g serve
Oct 25 11:11:58 AM    serve -s build
Oct 25 11:11:58 AM  
Oct 25 11:11:58 AM  Find out more about deployment here:
Oct 25 11:11:58 AM  
Oct 25 11:11:58 AM    https://cra.link/deployment
Oct 25 11:11:58 AM  
Oct 25 11:11:58 AM  Done in 17.43s.
Oct 25 11:11:58 AM  builder.sh: line 17: RENDER_STATIC_PUBLISH_PATH: unbound variable

Any idea what’s the problem?

TIA!

1 Like

Same problem. Nothing in the docs regarding this :thinking:

Maybe its an issue on render’s side :man_shrugging:

Fixed:

In your project dashboard, go to environment variables and add: RENDER_STATIC_PUBLISH_PATH=./build

For some reason, it is not adding it automatically from the settings.

1 Like

Thx, that works!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.