Error during flyctl deploy --remote-only: npm install --omit=dev failed

Hi everyone,

I’m encountering an issue when trying to deploy my app using Fly.io. When I run the command flyctl deploy --remote-only, I get the following error:

Error: Failed to fetch an image or build from source: error building: was unable to solve: process “/bin/sh -c npm install --omit=dev” did not complete successfully: exit code: 1

It seems like the deployment process is failing at the npm install --omit=dev step. I’ve checked my package.json and Dockerfile, and everything looks correct to me.

I’ve tried searching for solutions but haven’t found anything that resolves this issue. Has anyone encountered a similar problem or have any suggestions on how to fix it?

Hi @Jitali_2103 ,

Could it be that you don’t have npm installed on your docker container? Is your image based on node:alpine or are you using some linux distro and you’re installing it manually?

Hi @AlexOpr ,

For this, I have found a solution.
Thanks for sharing the solution with me.

May I know the solution? Because I’m facing the same issue

Hi @Divya_3 ,

Can you please share a snapshot of that issue?

Remove the npm package: ‘@shopify/polaris-icons’

Use another package instead of this.

This worked for us, I hope this will help you too.

It worked, thank you!

1 Like