fuwari icon indicating copy to clipboard operation
fuwari copied to clipboard

在启用banner时无法进行build

Open LitenPanJun opened this issue 1 year ago • 2 comments

构建平台:Netlify 系统:Ubuntu Focal 20.04 node版本:20.17.0 LTS 复现:

  • 在config中启用banner(无论是否使用demo-banner)
  • 提交并推送修改,进入Netlify构建
  • 构建失败,报错内容如下:

12:58:41 AM: 16:58:41 ▶ src/pages/about.astro 12:58:42 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2) 12:58:42 AM: 16:58:41 └─ /about/index.htmlfiles[normalizedPath] is not a function 12:58:42 AM: Stack trace: 12:58:42 AM: at file:///opt/build/repo/dist/chunks/MainGridLayout_GZr1Vl02.mjs:3724:38 12:58:42 AM: at AstroComponentInstance.init (file:///opt/build/repo/dist/chunks/astro/server_IdM1c9Fn.mjs:965:29) 12:58:42 AM: at async renderToString (file:///opt/build/repo/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_mxf6w3ma2fsgfwrwif5334p6de/node_modules/astro/dist/runtime/server/render/astro/render.js:19:5) 12:58:42 AM: at async lastNext (file:///opt/build/repo/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_mxf6w3ma2fsgfwrwif5334p6de/node_modules/astro/dist/core/render-context.js:132:25) 12:58:42 AM: at async RenderContext.render (file:///opt/build/repo/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]_t_mxf6w3ma2fsgfwrwif5334p6de/node_modules/astro/dist/core/render-context.js:163:22) 12:58:42 AM: ​ 12:58:42 AM: "build.command" failed
12:58:42 AM: ──────────────────────────────────────────────────────────────── 12:58:42 AM: ​ 12:58:42 AM: Error message 12:58:42 AM: Command failed with exit code 1: astro build (https://ntl.fyi/exit-code-1) 12:58:42 AM: ​ 12:58:42 AM: Error location 12:58:42 AM: In Build command from Netlify app: 12:58:42 AM: astro build 12:58:42 AM: ​ 12:58:42 AM: Resolved config 12:58:42 AM: build: 12:58:42 AM: command: astro build 12:58:42 AM: commandOrigin: ui 12:58:42 AM: publish: /opt/build/repo/dist 12:58:42 AM: publishOrigin: ui 12:58:42 AM: Build failed due to a user error: Build script returned non-zero exit code: 2 12:58:42 AM: Failing build: Failed to build site 12:58:42 AM: Finished processing build request in 35.22s

可以确认此问题在当前最新的提交中依旧存在

LitenPanJun avatar Sep 16 '24 17:09 LitenPanJun

找不到图片文件导致的,请先检查输入的文件路径是否正确,包括大小写

saicaca avatar Sep 17 '24 05:09 saicaca

已解决,感谢 很抱歉这么久才给出回复,添麻烦了,不好意思

LitenPanJun avatar Oct 26 '24 17:10 LitenPanJun