首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Netlify反应Depoly

Netlify反应Depoly
EN

Stack Overflow用户
提问于 2022-08-04 05:03:36
回答 1查看 30关注 0票数 0

我一直在尝试从我的Github帐户部署一个react应用程序,它一直在失败,我尝试先构建应用程序,拖放过程开始工作。拜托,有什么问题吗?

这是我的部署日志

代码语言:javascript
复制
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

EN

回答 1

Stack Overflow用户

发布于 2022-08-06 18:13:19

src/components/Gallery/Gallery.jsx第61:36行: Array.prototype.map()期望箭头函数数组-回调-返回的返回值

这是您的错误,您需要检查第61行的Gallery.jsx文件,基本上需要返回值。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73230578

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档