Error deploying a full stack application

ISSUE
I am having issue deploying my full stack application, it has a node.js as a back-end and react on the front-end.

WHAT I HAVE TRIED
I have tried removing my proxy and my cra build watch in the node.js back-end, also added start
and end concurrently in my package.json file in the parent file.

ERROR

10:31:00 AM: build-image tag: v4.16.1
10:31:00 AM: buildbot version: 0be68edd034c744ad79b207db44f42646b4e8ecb
10:31:00 AM: Fetching cached dependencies
10:31:00 AM: Failed to fetch cache, continuing with build
10:31:00 AM: Starting to prepare the repo for build
10:31:00 AM: No cached dependencies found. Cloning fresh repo
10:31:00 AM: git clone --filter=blob:none https://github.com/Ris345/Twitter-Showcase-App
10:31:02 AM: Preparing Git Reference refs/heads/main
10:31:03 AM: Parsing package.json dependencies
10:31:04 AM: Starting build script
10:31:04 AM: Installing dependencies
10:31:04 AM: Python version set to 2.7
10:31:05 AM: v16.19.0 is already installed.
10:31:05 AM: Now using node v16.19.0 (npm v8.19.3)
10:31:05 AM: Enabling node corepack
10:31:05 AM: Started restoring cached build plugins
10:31:05 AM: Finished restoring cached build plugins
10:31:05 AM: Attempting ruby version 2.7.2, read from environment
10:31:06 AM: Using ruby version 2.7.2
10:31:06 AM: Using PHP version 8.0
10:31:06 AM: No npm workspaces detected
10:31:06 AM: Started restoring cached node modules
10:31:06 AM: Finished restoring cached node modules
10:31:07 AM: Installing NPM modules using NPM version 8.19.3
10:31:12 AM: added 73 packages, and audited 74 packages in 5s
10:31:12 AM: 18 packages are looking for funding
10:31:12 AM:   run `npm fund` for details
10:31:12 AM: found 0 vulnerabilities
10:31:12 AM: NPM modules installed
10:31:12 AM: Creating package sha
10:31:12 AM: Started restoring cached go cache
10:31:12 AM: Finished restoring cached go cache
10:31:13 AM: go version go1.19.4 linux/amd64
10:31:13 AM: Detected 0 framework(s)
10:31:13 AM: Installing missing commands
10:31:13 AM: Verify run directory
10:31:13 AM: Section completed: initializing
10:31:15 AM: ​
10:31:15 AM:   Netlify Build                                                 
10:31:15 AM: ────────────────────────────────────────────────────────────────
10:31:15 AM: ​
10:31:15 AM: ❯ Version
10:31:15 AM:   @netlify/build 29.2.1
10:31:15 AM: ​
10:31:15 AM: ❯ Flags
10:31:15 AM:   baseRelDir: true
10:31:15 AM:   buildId: 63ac60ff6729f20008f5f83d
10:31:15 AM:   deployId: 63ac60ff6729f20008f5f83f
10:31:15 AM: ​
10:31:15 AM: ❯ Current directory
10:31:15 AM:   /opt/build/repo
10:31:15 AM: ​
10:31:15 AM: ❯ Config file
10:31:15 AM:   No config file was defined: using default values.
10:31:15 AM: ​
10:31:15 AM: ❯ Context
10:31:15 AM:   production
10:31:15 AM: ​
10:31:15 AM:   1. Build command from Netlify app                             
10:31:15 AM: ────────────────────────────────────────────────────────────────
10:31:15 AM: ​
10:31:15 AM: $ CI='' npm run build
10:31:15 AM: > twitterapp@1.0.0 build
10:31:15 AM: > concurrently "npm run start --prefix front-end" "npm run start --prefix back-end"
10:31:15 AM: [1]
10:31:15 AM: [1] > back-end@1.0.0 start
10:31:15 AM: [1] > nodemon app.js
10:31:15 AM: [1]
10:31:15 AM: [1] sh: 1: nodemon: not found
10:31:15 AM: [1] npm run start --prefix back-end exited with code 127
10:31:15 AM: [0]
10:31:15 AM: [0] > front-end@0.1.0 start
10:31:15 AM: [0] > react-scripts start
10:31:15 AM: [0]
10:31:15 AM: [0] sh: 1: react-scripts: not found
10:31:15 AM: [0] npm run start --prefix front-end exited with code 127
10:31:15 AM: ​
10:31:15 AM:   "build.command" failed                                        
10:31:15 AM: ────────────────────────────────────────────────────────────────
10:31:15 AM: ​
10:31:15 AM:   Error message
10:31:15 AM:   Command failed with exit code 1: CI='' npm run build (https://ntl.fyi/exit-code-1)
10:31:15 AM: ​
10:31:15 AM:   Error location
10:31:15 AM:   In Build command from Netlify app:
10:31:15 AM:   CI='' npm run build
10:31:16 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
10:31:15 AM: ​
10:31:15 AM:   Resolved config
10:31:15 AM:   build:
10:31:15 AM:     command: CI='' npm run build
10:31:15 AM:     commandOrigin: ui
10:31:15 AM:     publish: /opt/build/repo
10:31:15 AM:     publishOrigin: ui
10:31:16 AM: Caching artifacts
10:31:16 AM: Started saving node modules
10:31:16 AM: Finished saving node modules
10:31:16 AM: Started saving build plugins
10:31:16 AM: Finished saving build plugins
10:31:16 AM: Started saving pip cache
10:31:16 AM: Finished saving pip cache
10:31:16 AM: Started saving emacs cask dependencies
10:31:16 AM: Finished saving emacs cask dependencies
10:31:16 AM: Started saving maven dependencies
10:31:16 AM: Finished saving maven dependencies
10:31:16 AM: Started saving boot dependencies
10:31:16 AM: Finished saving boot dependencies
10:31:16 AM: Started saving rust rustup cache
10:31:16 AM: Finished saving rust rustup cache
10:31:16 AM: Started saving go dependencies
10:31:16 AM: Finished saving go dependencies
10:31:16 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:31:16 AM: Failing build: Failed to build site
10:31:17 AM: Finished processing build request in 16.631914356s```

Hi @Ris345 :wave:t6:,

Thanks so much for reaching out and welcome to the Netlify Forums. :netliconfetti: Have you looked through this resource 7? It is a compilation of all of our build and deploy resources. This is a good starting point.

Have you got it working locally first? If not, please do that.

Lastly, please share these additional details so we can look into your experience further:

  • the name of your build instance: “example-jones.netlify.com 1
  • your project repo
  • any error messages you have received in your terminal window or in the developer console

Thanks so much!

Thanks so much I am looking through these documentation, yes it does work locally.

here is my repo of the project – GitHub - Ris345/Twitter-Showcase-App

https://main--rococo-pasca-28ab5d.netlify.app/

no errors on the console

Hi @Ris345 :wave:t6:, thank you for providing that information. I checked your recent deploy and it looks like the site is published. Are you still experiencing issues with this site?

Netlify doesn’t really support back-ends. You might want to try to use Netlify Functions.

Hi Sam, Yes the site has error, I think I need to try using Netlify Functions because it has a node.js back-end. However, this is the message I get in on the deployed website. Thank you

Looks like you've followed a broken link or entered a URL that doesn't exist on this site.

 Back to our site

If this is your site, and you weren't expecting a 404 for this path, please visit Netlify's "page not found" support guide for troubleshooting tips.

Thank you will look into this, do I need to create a separate account for this or just use the existing account?

Hi to use Netlify functions you can use your existing account you don’t need to create a new one.