在 Netlify 上调试失败的 Gatsby 构建(无法解析组件)



站点在开发中运行良好。站点Github repo已连接到Netlify。当推送更改时,Netlify的构建失败。

看起来我的一些组件在构建阶段没有正确解决。但决心在发展中很好。

修剪下面的日志,从事情开始失败的地方开始:

1:30:26 PM: failed Building production JavaScript and CSS bundles - 24.846s
1:30:26 PM: error Generating JavaScript bundles failed
1:30:26 PM: Can't resolve '../components/SEO' in '/opt/build/repo/src/pages'
1:30:26 PM: error Generating JavaScript bundles failed
1:30:26 PM: Can't resolve '../components/SEO' in '/opt/build/repo/src/pages'
1:30:26 PM: error Generating JavaScript bundles failed
1:30:26 PM: Can't resolve '../components/SEO' in '/opt/build/repo/src/pages'
1:30:26 PM: error Generating JavaScript bundles failed
1:30:26 PM: Can't resolve '../components/SEO' in '/opt/build/repo/src/pages'
1:30:26 PM: error Generating JavaScript bundles failed
1:30:26 PM: Can't resolve '../components/SEO' in '/opt/build/repo/src/pages'
1:30:26 PM: error Generating JavaScript bundles failed
1:30:26 PM: Can't resolve '../components/SEO' in '/opt/build/repo/src/templates'
1:30:26 PM: error Generating JavaScript bundles failed
1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/layout'
1:30:26 PM: error Generating JavaScript bundles failed
1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/pages'
1:30:26 PM: error Generating JavaScript bundles failed
1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/pages'
1:30:26 PM: error Generating JavaScript bundles failed
1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/pages'
1:30:26 PM: error Generating JavaScript bundles failed
1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/pages'
1:30:26 PM: error Generating JavaScript bundles failed
1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/pages'
1:30:26 PM: error Generating JavaScript bundles failed
1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/templates'
1:30:26 PM: not finished run queries - 24.930s
1:30:26 PM: not finished Generating image thumbnails - 24.909s
1:30:26 PM: Skipping functions preparation step: no functions directory set
1:30:26 PM: Caching artifacts
1:30:26 PM: Started saving node modules
1:30:26 PM: Finished saving node modules
1:30:26 PM: Started saving pip cache
1:30:26 PM: Finished saving pip cache
1:30:26 PM: Started saving emacs cask dependencies
1:30:27 PM: Finished saving emacs cask dependencies
1:30:27 PM: Started saving maven dependencies
1:30:27 PM: Finished saving maven dependencies
1:30:27 PM: Started saving boot dependencies
1:30:27 PM: Finished saving boot dependencies
1:30:27 PM: Started saving go dependencies
1:30:27 PM: Finished saving go dependencies
1:30:29 PM: Error running command: Build script returned non-zero exit code: 1
1:30:30 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
1:30:29 PM: Failing build: Failed to build site
1:30:30 PM: Finished processing build request in 1m56.320874616s

完整日志

我建议检查您的远程存储库,看看您本地的文件是否真的被推送到了那里。

相关内容

  • 没有找到相关文章

最新更新