Skip to content

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

Open

Description

@humbertojaimes

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.

Activity

  1. pamelafox commented on Nov 4, 2025

    @pamelafox
    Contributor

    Can you try upgrading your azd version? There was a bug in the recent azd version that has since been patched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions