# Deployment issue – "executor failed running \[/bin/sh -c nm install && npm run prod\]..."

**URL:** <https://community.fly.io/t/deployment-issue-executor-failed-running-bin-sh-c-nm-install-npm-run-prod/5237>\
**Category:** Build debugging\
**Created:** [May 18, 2022, 4:37pm UTC](https://community.fly.io/t/deployment-issue-executor-failed-running-bin-sh-c-nm-install-npm-run-prod/5237 "2022-05-18T16:37:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackmcdade](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jackmcdade/32/3576_2.png) [@jackmcdade](https://community.fly.io/u/jackmcdade)\
**Post date:** [May 18, 2022, 4:37pm UTC](https://community.fly.io/t/deployment-issue-executor-failed-running-bin-sh-c-nm-install-npm-run-prod/5237/1 "2022-05-18T16:37:19Z")

</div>

I’m trying to deploy a Laravel application to [Fly.io](http://Fly.io) (using this example repo [GitHub - gregmsanderson/fly-hello-laravel: Sample Laravel app for deployment on Fly.io](https://github.com/gregmsanderson/fly-hello-laravel)) and get the following error when trying to run npm commands on deploy.

```auto
Error failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c npm install && npm run prod]: exit code: 243

```

---

<div class="post-metadata">

**Author:** ![greg](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/greg/32/2119_2.png) [@greg](https://community.fly.io/u/greg)\
**Post date:** [May 18, 2022, 7:59pm UTC](https://community.fly.io/t/deployment-issue-executor-failed-running-bin-sh-c-nm-install-npm-run-prod/5237/2 "2022-05-18T19:59:07Z")

</div>

For anyone that comes across this, we are tracking it in [Error failed to fetch an image or build from source · Issue #1 · gregmsanderson/fly-hello-laravel · GitHub](https://github.com/gregmsanderson/fly-hello-laravel/issues/1)

It can be avoided for now (if you don’t need/use mix) by commenting out/deleting this line in the Dockerfile for `npm install && npm run prod`. Then the deploy completes.

It _appears_ to be an update/change that _may_ be as simple as changing `npm run prod` to `npx mix` (or variation of). Since Laravel’s provided `package.json` simply adds an alias to that. And it seems `mix` is not available directly (presumably by not being in `PATH` …). And hence need to use the local dev dependency path, via `npx`.

Still investigating as many applications will use mix so it would be good to get that working again.

---

<div class="post-metadata">

**Author:** ![hb9cwp](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/hb9cwp/32/15573_2.png) [@hb9cwp](https://community.fly.io/u/hb9cwp)\
**Post date:** [May 18, 2022, 8:41pm UTC](https://community.fly.io/t/deployment-issue-executor-failed-running-bin-sh-c-nm-install-npm-run-prod/5237/3 "2022-05-18T20:41:18Z")

</div>

That problem does not seem specific to npm / Node.js. Since this morning, I can not re-deploy applications that use Dockerfiles which pull in Fedora/Linux and Go/Golang environments to build C and Go binaries remote in FRA.

---

<div class="post-metadata">

**Author:** ![greg](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/greg/32/2119_2.png) [@greg](https://community.fly.io/u/greg)\
**Post date:** [May 18, 2022, 9:03pm UTC](https://community.fly.io/t/deployment-issue-executor-failed-running-bin-sh-c-nm-install-npm-run-prod/5237/4 "2022-05-18T21:03:18Z")

</div>

@hb9cwp Strange. Would you mind creating a new post/thread for _that_ issue as it sounds like that may be a different issue to this. There is certainly a _similarity_ (in that what used to work now doesn’t) but in _this_ case it may be mix/Laravel specific. I haven’t taken a look yet as Jack was able to deploy without that line for now.
