Someone help please i got problem deploying react app build failed

Apr 1 03:17:35 AM ==> Cloning from https://github.com/username/frontend
Apr 1 03:17:36 AM ==> Checking out commit ea73d83f799aef2887d8d335e244887bdf0943163 in branch master
Apr 1 03:17:38 AM ==> Downloading cache…
Apr 1 03:17:55 AM ==> Transferred 142MB in 9s. Extraction took 6s.
Apr 1 03:18:15 AM ==> Installing dependencies with npm…
Apr 1 03:18:26 AM audited 1649 packages in 10.596s
Apr 1 03:18:27 AM
Apr 1 03:18:27 AM 247 packages are looking for funding
Apr 1 03:18:27 AM run npm fund for details
Apr 1 03:18:27 AM
Apr 1 03:18:27 AM found 3 high severity vulnerabilities
Apr 1 03:18:27 AM run npm audit fix to fix them, or npm audit for details
Apr 1 03:18:38 AM audited 1649 packages in 10.709s
Apr 1 03:18:39 AM
Apr 1 03:18:39 AM 247 packages are looking for funding
Apr 1 03:18:39 AM run npm fund for details
Apr 1 03:18:39 AM
Apr 1 03:18:39 AM found 3 high severity vulnerabilities
Apr 1 03:18:39 AM run npm audit fix to fix them, or npm audit for details
Apr 1 03:18:49 AM ==> Using Python version: 3.7.10
Apr 1 03:18:52 AM ==> Running build command ‘npm run build’…
Apr 1 03:18:52 AM
Apr 1 03:18:52 AM > frontend@0.1.0 build /opt/render/project/src
Apr 1 03:18:52 AM > react-scripts build
Apr 1 03:18:52 AM
Apr 1 03:18:54 AM Creating an optimized production build…
Apr 1 03:18:55 AM Failed to compile.
Apr 1 03:18:55 AM
Apr 1 03:18:55 AM Module not found: Error: Can’t resolve ‘react’ in ‘/opt/render/project/src/src’
Apr 1 03:18:55 AM
Apr 1 03:18:55 AM
Apr 1 03:18:55 AM npm ERR! code ELIFECYCLE
Apr 1 03:18:55 AM npm ERR! errno 1
Apr 1 03:18:55 AM npm ERR! frontend@0.1.0 build: react-scripts build
Apr 1 03:18:55 AM npm ERR! Exit status 1
Apr 1 03:18:55 AM npm ERR!
Apr 1 03:18:55 AM npm ERR! Failed at the frontend@0.1.0 build script.
Apr 1 03:18:55 AM npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Apr 1 03:18:55 AM
Apr 1 03:18:55 AM npm ERR! A complete log of this run can be found in:
Apr 1 03:18:55 AM npm ERR! /opt/render/.cache/_logs/2023-04-01T03_18_55_804Z-debug.log
Apr 1 03:18:55 AM ==> Build failed :disappointed:

Hey,

You’ll need to make sure to run “npm install” and “npm run build” as part of your “Build Command”.

Something like “npm install && npm run build” will work.

Regards.
Jérémy, Render Support

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