0

I have been trying to deploy a react-app from my Github account and it keeps failing. I tried building the app first, and the drag-and-drop process worked. Please, what could be the issue?

This is my deploy Log

1:57:03 AM: Most CI servers set it automatically.
1:57:03 AM: 
1:57:03 AM: Failed to compile.
1:57:03 AM: 
1:57:03 AM: [eslint]
1:57:03 AM: src/components/Gallery/Gallery.jsx
1:57:03 AM:   Line 61:36:  Array.prototype.map() expects a return value from arrow function  array-callback-return
1:57:03 AM: ​
1:57:03 AM: ────────────────────────────────────────────────────────────────
1:57:03 AM:   "build.command" failed                                        
1:57:03 AM: ────────────────────────────────────────────────────────────────
1:57:03 AM: ​
1:57:03 AM:   Error message
1:57:03 AM:   Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
1:57:03 AM: ​
1:57:03 AM:   Error location
1:57:03 AM:   In Build command from Netlify app:
1:57:03 AM:   npm run build
1:57:03 AM: ​
1:57:03 AM:   Resolved config
1:57:03 AM:   build:
1:57:03 AM:     command: npm run build
1:57:03 AM:     commandOrigin: ui
1:57:03 AM:     publish: /opt/build/repo/build
1:57:03 AM:     publishOrigin: ui
1:57:03 AM: Caching artifacts
1:57:03 AM: Started saving node modules
1:57:03 AM: Finished saving node modules
1:57:03 AM: Started saving build plugins
1:57:03 AM: Finished saving build plugins
1:57:03 AM: Started saving pip cache
1:57:03 AM: Finished saving pip cache
1:57:03 AM: Started saving emacs cask dependencies
1:57:03 AM: Finished saving emacs cask dependencies
1:57:03 AM: Started saving maven dependencies
1:57:03 AM: Finished saving maven dependencies
1:57:03 AM: Started saving boot dependencies
1:57:03 AM: Finished saving boot dependencies
1:57:03 AM: Started saving rust rustup cache
1:57:03 AM: Finished saving rust rustup cache
1:57:03 AM: Started saving go dependencies
1:57:03 AM: Finished saving go dependencies
1:57:05 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
1:57:05 AM: Creating deploy upload records
1:57:05 AM: Failing build: Failed to build site
1:57:05 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
1:57:05 AM: Finished processing build request in 40.07674622s
  • `1:57:03 AM: src/components/Gallery/Gallery.jsx 1:57:03 AM: Line 61:36: Array.prototype.map() expects a return value from arrow function array-callback-return` Isn't that clear enough already? – Matthew Kwong Aug 04 '22 at 06:32

1 Answers1

0

src/components/Gallery/Gallery.jsx Line 61:36: Array.prototype.map() expects a return value from arrow function array-callback-return

This is your error you need to check your Gallery.jsx file of line number 61 basically needs to return the value.

Shilpe Saxena
  • 219
  • 2
  • 8