R
Railway2mo ago
wnnacry

Can't deploy react

Hello i try to deploy my react app, but error, here the logs, anyone can help? Project Id: 4f74db8e-a3b5-42b8-b383-5d9a8264d76b 24 | >>> RUN --mount=type=cache,id=s/15230927-6680-4907-b655-71c782126f40-node_modules/cache,target=/app/node_modules/.cache yarn run build 25 | 26 | ------------------- ERROR: failed to solve: process "/bin/bash -ol pipefail -c yarn run build" did not complete successfully: exit code: 1 Docker build failed
Solution:
https://github.com/brody192/create-react-app-starter please copy the nixpacks.toml and Caddyfile from this repo into your frontend project....
Jump to solution
4 Replies
Percy
Percy2mo ago
Project ID: 4f74db8e-a3b5-42b8-b383-5d9a8264d76b,15230927-6680-4907-b655-71c782126f40
wnnacry
wnnacryOP2mo ago
Update: the error solve by adding port call in the package.json But i find new error in email said Deploy Ran Out of Memory! This is the logs in deploy logs error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. container event container restart yarn run v1.22.22 $ PORT=$PORT react-scripts start Browserslist: caniuse-lite is outdated. Please run: npx update-browserslist-db@latest Why you should do it regularly: https://github.com/browserslist/update-db#readme (node:32) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option. (Use node --trace-deprecation ... to show where the warning was created) (node:32) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option. Starting the development server... The build failed because the process exited too early. This probably means the system ran out of memory or someone called kill -9 on the process. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. container event container died
Brody
Brody2mo ago
the issue is that you are running a development server.
Solution
Brody
Brody2mo ago
https://github.com/brody192/create-react-app-starter please copy the nixpacks.toml and Caddyfile from this repo into your frontend project.
Want results from more Discord servers?
Add your server