Azure-Samples / Azure-Samples/rag-postgres-openai-python

ERROR: error executing step command 'package --all'

未關閉
#288 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
505
分支
1.1k
平均合併
3 天 13 小時
30 天內合併 PR
1

描述

I am having this issue during the azd up deployment. I have azd version 1.20.2

I tried deploying using Github Codespaces and locally with the same result.
Packaging services (azd package)

(x) Failed: Packaging service web

ERROR: error executing step command 'package --all': failed building service 'web': failed invoking event handlers for 'prebuild', 'prebuild' hook failed with exit code: '127', Path: '/tmp/azd-prebuild-1940153890.sh'. : exit code: 127, stdout: , stderr: /bin/sh: 1: /tmp/azd-prebuild-1940153890.sh: not found

I was able to deploy the template after create an script file with the commands in the prebuild hook

```
#!/bin/sh
set -e

cd "$(dirname "$0")/../src/frontend"
npm install
npm run build
```

Then I changed the hook

```
posix:
shell: sh
run: ../../scripts/prebuild.sh
interactive: false
continueOnError: false
```

It worked for both Github Codespaces and in my local.

貢獻指南

開啟貢獻指南

研究方向

Start with the azd up and azd package --all flow and inspect the prebuild hook that invokes /tmp/azd-prebuild-1940153890.sh. Compare it with the working scripts/prebuild.sh workaround, including the posix shell configuration. Done means packaging the web service succeeds in both GitHub Codespaces and a local environment without the workaround.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python, shell
領域
build-system, cloud, devops
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。