Hello everyone,
I have a problem to deploy react app to render. I’m try to deploy this app but I see this error : Exited with status 1 while building your code.
So I’m created a mern app. And I’m deploy express js from github to render succesfully. But when I’m trying to deploy React js to render using web static service by render. I see 2 errors every time.
1- Error number 1 : Exited with status 1 while building your code. Logs errors are like :
RubyGems installed the following executables:
/opt/render/project/rubies/ruby-3.2.2/bin/gem
/opt/render/project/rubies/ruby-3.2.2/bin/bundle
/opt/render/project/rubies/ruby-3.2.2/bin/bundler
RubyGems system software updated
==> Using Python version 3.7.0 via environment variable PYTHON_VERSION
==> Docs on specifying a Python version: https://render.com/docs/python-version
==> Using Poetry version 1.5.1 via environment variable POETRY_VERSION
==> Docs on specifying a Poetry version: https://render.com/docs/poetry-version
==> Installing Poetry version 1.5.1
this is the image of error n1 to understand more:
I’m trying to edit environment of PYTHON_VERSION, NODE_VERSION, POETRY_VERSION and RUBY_VERSION many times with many versions as it exist in docs, but the same error showing.
2- Error Number Two: Exited with status 1 while building your code. Logs errors are like :
To get started you need Poetry's bin directory (/opt/render/project/poetry/bin) in your `PATH`
environment variable.
Add `export PATH="/opt/render/project/poetry/bin:$PATH"` to your shell configuration file.
Alternatively, you can call Poetry explicitly with `/opt/render/project/poetry/bin/poetry`.
You can test that everything is set up by executing:
`poetry --version`
==> Running build command 'yarn build'...
yarn run v1.22.21
error Couldn't find a package.json file in "/opt/render/project/src/client"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
==> Build failed 😞
this is the image of error n2 to understand more :
I’m trying to edit build command every time with these commands :
-
`yarn build`
-
`yarn run build`
-
`npm run build`
But the same error showing here. I don’t know what is the problem exact. I’m searching for many solutions in the internet, but without results.
Anyone can help me here.
I am ready to explain further if there is anything unclear about my problem. Just leave a comment and I will explain more. I am waiting for your answer.
Thank you so much.
For error N1 : I’m trying to edit environment of PYTHON_VERSION, NODE_VERSION, POETRY_VERSION and RUBY_VERSION many times with many versions as it exist in docs, but the same error showing.
For error N2: I’m trying to edit build command every time with these commands :
- yarn build
- yarn run build
- npm run build
But the same error showing here. I don’t know what is the problem exact. I’m searching for many solutions in the internet, but without results.