This is my first time trying to use Fly and I have some issues when try to deploy. I got this issue when trying to deploy my rails app, I try with a lot of suggestions in this forum but I couldn’t find someone that fix my issue.
==> Verifying app config
--> Verified app config
==> Building image
Remote builder fly-builder-throbbing-frost-9176 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
Sending build context to Docker daemon 635.6kB
[+] Building 18.7s (18/25)
=> [internal] load remote build context 0.0s
=> copy /context / 0.1s
=> resolve image config for docker.io/docker/dockerfile:experimental 0.3s
=> CACHED docker-image://docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496ff5 0.0s
=> [internal] load metadata for quay.io/evl.ms/fullstaq-ruby:2.7.6-jemalloc-slim 0.2s
=> [base 1/6] FROM quay.io/evl.ms/fullstaq-ruby:2.7.6-jemalloc-slim@sha256:a7a7889400d58bea89344e158399f69e0d230350270b37160081e1b42bf7192d 0.0s
=> CACHED [base 2/6] RUN mkdir /app 0.0s
=> CACHED [base 3/6] WORKDIR /app 0.0s
=> CACHED [base 4/6] RUN mkdir -p tmp/pids 0.0s
=> CACHED [base 5/6] RUN curl https://get.volta.sh | bash 0.0s
=> CACHED [base 6/6] RUN volta install node@19.3.0 yarn@1.22.19 && gem update --system --no-document && gem install -N bundler -v 2.1.4 0.0s
=> CACHED [stage-4 1/8] RUN --mount=type=cache,id=prod-apt-cache,sharing=locked,target=/var/cache/apt --mount=type=cache,id=prod-apt-lib,sharing=locked,target=/var/lib/apt apt-get update - 0.0s
=> CACHED [build_deps 1/1] RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt --mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt apt-get update 0.0s
=> CACHED [gems 1/2] COPY Gemfile* ./ 0.0s
=> CANCELED [gems 2/2] RUN bundle install && rm -rf vendor/bundle/ruby/*/cache 18.0s
=> CACHED [node_modules 1/3] COPY package*json ./ 0.0s
=> CACHED [node_modules 2/3] COPY yarn.* ./ 0.0s
=> ERROR [node_modules 3/3] RUN yarn install 17.8s
------
> [node_modules 3/3] RUN yarn install:
#21 0.658 yarn install v1.22.19
#21 0.744 [1/4] Resolving packages...
#21 1.112 [2/4] Fetching packages...
#21 12.10 [3/4] Linking dependencies...
#21 12.11 warning " > webpack-dev-server@3.11.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
#21 12.11 warning "webpack-dev-server > webpack-dev-middleware@3.7.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
#21 15.92 [4/4] Building fresh packages...
#21 17.25 error /app/node_modules/node-sass: Command failed.
#21 17.25 Exit code: 1
#21 17.25 Command: node scripts/build.js
#21 17.25 Arguments:
#21 17.25 Directory: /app/node_modules/node-sass
#21 17.25 Output:
#21 17.25 Building: /root/.volta/tools/image/node/19.3.0/bin/node /app/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
#21 17.25 gyp info it worked if it ends with ok
#21 17.25 gyp verb cli [
#21 17.25 gyp verb cli '/root/.volta/tools/image/node/19.3.0/bin/node',
#21 17.25 gyp verb cli '/app/node_modules/node-gyp/bin/node-gyp.js',
#21 17.25 gyp verb cli 'rebuild',
#21 17.25 gyp verb cli '--verbose',
#21 17.25 gyp verb cli '--libsass_ext=',
#21 17.25 gyp verb cli '--libsass_cflags=',
#21 17.25 gyp verb cli '--libsass_ldflags=',
#21 17.25 gyp verb cli '--libsass_library='
#21 17.25 gyp verb cli ]
#21 17.25 gyp info using node-gyp@3.8.0
#21 17.25 gyp info using node@19.3.0 | linux | x64
#21 17.25 gyp verb command rebuild []
#21 17.25 gyp verb command clean []
#21 17.25 gyp verb clean removing "build" directory
#21 17.25 gyp verb command configure []
#21 17.25 gyp verb check python checking for Python executable "python2" in the PATH
#21 17.25 gyp verb `which` failed Error: not found: python2
#21 17.25 gyp verb `which` failed at getNotFoundError (/app/node_modules/which/which.js:13:12)
#21 17.25 gyp verb `which` failed at F (/app/node_modules/which/which.js:68:19)
#21 17.25 gyp verb `which` failed at E (/app/node_modules/which/which.js:80:29)
#21 17.25 gyp verb `which` failed at /app/node_modules/which/which.js:89:16
#21 17.25 gyp verb `which` failed at /app/node_modules/isexe/index.js:42:5
#21 17.25 gyp verb `which` failed at /app/node_modules/isexe/mode.js:8:5
#21 17.25 gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:190:21)
#21 17.25 gyp verb `which` failed python2 Error: not found: python2
#21 17.25 gyp verb `which` failed at getNotFoundError (/app/node_modules/which/which.js:13:12)
#21 17.25 gyp verb `which` failed at F (/app/node_modules/which/which.js:68:19)
#21 17.25 gyp verb `which` failed at E (/app/node_modules/which/which.js:80:29)
#21 17.25 gyp verb `which` failed at /app/node_modules/which/which.js:89:16
#21 17.25 gyp verb `which` failed at /app/node_modules/isexe/index.js:42:5
#21 17.25 gyp verb `which` failed at /app/node_modules/isexe/mode.js:8:5
#21 17.25 gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:190:21) {
#21 17.25 gyp verb `which` failed code: 'ENOENT'
#21 17.25 gyp verb `which` failed }
#21 17.25 gyp verb check python checking for Python executable "python" in the PATH
#21 17.25 gyp verb `which` failed Error: not found: python
#21 17.25 gyp verb `which` failed at getNotFoundError (/app/node_modules/which/which.js:13:12)
#21 17.25 gyp verb `which` failed at F (/app/node_modules/which/which.js:68:19)
#21 17.25 gyp verb `which` failed at E (/app/node_modules/which/which.js:80:29)
#21 17.25 gyp verb `which` failed at /app/node_modules/which/which.js:89:16
#21 17.25 gyp verb `which` failed at /app/node_modules/isexe/index.js:42:5
#21 17.25 gyp verb `which` failed at /app/node_modules/isexe/mode.js:8:5
#21 17.25 gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:190:21)
#21 17.25 gyp verb `which` failed python Error: not found: python
#21 17.25 gyp verb `which` failed at getNotFoundError (/app/node_modules/which/which.js:13:12)
#21 17.25 gyp verb `which` failed at F (/app/node_modules/which/which.js:68:19)
#21 17.25 gyp verb `which` failed at E (/app/node_modules/which/which.js:80:29)
#21 17.25 gyp verb `which` failed at /app/node_modules/which/which.js:89:16
#21 17.25 gyp verb `which` failed at /app/node_modules/isexe/index.js:42:5
#21 17.25 gyp verb `which` failed at /app/node_modules/isexe/mode.js:8:5
#21 17.25 gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:190:21) {
#21 17.25 gyp verb `which` failed code: 'ENOENT'
#21 17.25 gyp verb `which` failed }
#21 17.25 gyp ERR! configure error
#21 17.25 gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
#21 17.25 gyp ERR! stack at PythonFinder.failNoPython (/app/node_modules/node-gyp/lib/configure.js:484:19)
#21 17.25 gyp ERR! stack at PythonFinder.<anonymous> (/app/node_modules/node-gyp/lib/configure.js:406:16)
#21 17.25 gyp ERR! stack at F (/app/node_modules/which/which.js:68:16)
#21 17.25 gyp ERR! stack at E (/app/node_modules/which/which.js:80:29)
#21 17.25 gyp ERR! stack at /app/node_modules/which/which.js:89:16
#21 17.25 gyp ERR! stack at /app/node_modules/isexe/index.js:42:5
#21 17.25 gyp ERR! stack at /app/node_modules/isexe/mode.js:8:5
#21 17.25 gyp ERR! stack at FSReqCallback.oncomplete (node:fs:190:21)
#21 17.25 gyp ERR! System Linux 5.12.2
#21 17.25 gyp ERR! command "/root/.volta/tools/image/node/19.3.0/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
#21 17.25 gyp ERR! cwd /app/node_modules/node-sass
#21 17.25 gyp ERR! node -v v19.3.0
#21 17.25 gyp ERR! node-gyp -v v3.8.0
#21 17.25 gyp ERR! not ok
#21 17.25 Build failed with error code: 1
#21 17.25 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
Error failed to fetch an image or build from source: error building: executor failed running [/bin/bash -o pipefail -c yarn install]: exit code: 1