部署到Netlify时出错-在“构建站点”阶段失败:构建脚本返回了非零退出代码:1

时间:2020-01-05 23:38:11

标签: reactjs deployment gatsby netlify

这是第一次成功,但是在更改了一些内容之后,我将其推送到了GitHub,但更新失败。

该站点在本地运行良好,我尝试追溯步骤以查看发生错误时如何处理,然后卸载并重新安装我的依赖项。

我已经尝试了几天。

5:45:45 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/fsevents):
5:45:45 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5:45:45 PM: npm
5:45:45 PM:  WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/chokidar/node_modules/fsevents):
5:45:45 PM: npm
5:45:45 PM:  WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5:45:45 PM: added 2054 packages from 1118 contributors and audited 22627 packages in 38.495s
5:45:47 PM: 57 packages are looking for funding
5:45:47 PM:   run `npm fund` for details
5:45:47 PM: found 0 vulnerabilities
5:45:47 PM: NPM modules installed
5:45:48 PM: Started restoring cached go cache
5:45:48 PM: Finished restoring cached go cache
5:45:48 PM: unset GOOS;
5:45:48 PM: unset GOARCH;
5:45:48 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
5:45:48 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
5:45:48 PM: go version >&2;
5:45:48 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
5:45:48 PM: go version go1.12 linux/amd64
5:45:48 PM: Installing missing commands
5:45:48 PM: Verify run directory
5:45:48 PM: Executing user command: gatsby build
5:45:50 PM: success open and validate gatsby-configs - 0.018s
5:45:50 PM: success load plugins - 0.254s
5:45:50 PM: success onPreInit - 0.001s
5:45:50 PM: success delete html and css files from previous builds - 0.014s
5:45:50 PM: success initialize cache - 0.018s
5:45:50 PM: success copy gatsby files - 0.061s
5:45:50 PM: success onPreBootstrap - 0.007s
5:45:50 PM: success createSchemaCustomization - 0.004s
5:45:51 PM: success source and transform nodes - 0.114s
5:45:51 PM: success building schema - 0.261s
5:45:51 PM: success createPages - 0.000s
5:45:51 PM: success createPagesStatefully - 0.064s
5:45:51 PM: success onPreExtractQueries - 0.000s
5:45:51 PM: success update schema - 0.019s
5:45:51 PM: success extract queries from components - 0.133s
5:45:51 PM: success write out requires - 0.004s
5:45:51 PM: success write out redirect data - 0.001s
5:45:51 PM: success onPostBootstrap - 0.000s
5:45:51 PM: ⠀
5:45:51 PM: info bootstrap finished - 3.201 s
5:45:51 PM: ⠀
5:46:19 PM: failed Building production JavaScript and CSS bundles - 27.635s
5:46:19 PM: error Generating JavaScript bundles failed
5:46:19 PM: Can't resolve '../components/Testimonials' in '/opt/build/repo/src/pages'
5:46:19 PM: error Generating JavaScript bundles failed
5:46:19 PM: Can't resolve './formPersonal.module.scss' in '/opt/build/repo/src/components'
5:46:19 PM: not finished run queries - 27.661s
5:46:19 PM: Skipping functions preparation step: no functions directory set
5:46:19 PM: Caching artifacts
5:46:19 PM: Started saving node modules
5:46:19 PM: Finished saving node modules
5:46:19 PM: Started saving pip cache
5:46:19 PM: Finished saving pip cache
5:46:19 PM: Started saving emacs cask dependencies
5:46:19 PM: Finished saving emacs cask dependencies
5:46:19 PM: Started saving maven dependencies
5:46:19 PM: Finished saving maven dependencies
5:46:19 PM: Started saving boot dependencies
5:46:19 PM: Finished saving boot dependencies
5:46:19 PM: Started saving go dependencies
5:46:19 PM: Finished saving go dependencies
5:46:22 PM: Error running command: Build script returned non-zero exit code: 1
5:46:22 PM: Failing build: Failed to build site
5:46:22 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
5:46:22 PM: Finished processing build request in 1m27.038617788s

0 个答案:

没有答案