0

我在 Netlify 中使用 yarn 进行命令构建设置失败,直到不久前它才正常工作。我试图将构建命令更改为:

  • CI =纱线构建,
  • CI = 纱线运行构建
  • 纱线构建
  • 纱线运行构建和其他......

但我没有成功,我想知道为什么会发生这种情况以及我有什么其他的替代方案来解决这个问题?感谢您的关注。

部署日志:

             ────────────────────────────────────────────────────────────────
7:11:32 AM:   "build.command" failed                                        
7:11:32 AM: ────────────────────────────────────────────────────────────────
7:11:32 AM: ​
7:11:32 AM:   Error message
7:11:32 AM:   Command failed with exit code 127: CI = yarn build
7:11:32 AM: ​
7:11:32 AM:   Error location
7:11:32 AM:   In Build command from Netlify app:
7:11:32 AM:   CI = yarn build
7:11:32 AM: ​
7:11:32 AM:   Resolved config
7:11:32 AM:   build:
7:11:32 AM:     base: /opt/build/repo/frontend
7:11:32 AM:     command: CI = yarn build
7:11:32 AM:     commandOrigin: ui
7:11:32 AM:     environment:
7:11:32 AM:       - REACT_APP_BACKEND_URL
7:11:32 AM:       - YARN_FLAGS
7:11:32 AM:     publish: /opt/build/repo/frontend/build
7:11:32 AM:     publishOrigin: ui
7:11:33 AM: Caching artifacts
7:11:33 AM: Started saving node modules
7:11:33 AM: Finished saving node modules
7:11:33 AM: Started saving build plugins
7:11:33 AM: Finished saving build plugins
7:11:33 AM: Started saving yarn cache
7:11:42 AM: Finished saving yarn cache
7:11:42 AM: Started saving pip cache
7:11:42 AM: Finished saving pip cache
7:11:42 AM: Started saving emacs cask dependencies
7:11:42 AM: Finished saving emacs cask dependencies
7:11:42 AM: Started saving maven dependencies
7:11:42 AM: Finished saving maven dependencies
7:11:42 AM: Started saving boot dependencies
7:11:42 AM: Finished saving boot dependencies
7:11:42 AM: Started saving rust rustup cache
7:11:42 AM: Finished saving rust rustup cache
7:11:42 AM: Started saving go dependencies
7:11:42 AM: Finished saving go dependencies
7:11:44 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:11:44 AM: Creating deploy upload records
7:11:45 AM: Failing build: Failed to build site
7:11:45 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
7:11:45 AM: Finished processing build request in 1m6.06516331s
4

0 回答 0