Issue when try to deploy rails app (yarn)

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

I’d appreciate seeing your package.json file; but I suspect that adding the following to the ARG BUILD_PACKAGES line in your Dockerfile will address the problem:

python-is-python3 pkg-config

Here is my package.json:

{
  "name": "app-gfqo-2",
  "private": true,
  "dependencies": {
    "@rails/actioncable": "^6.0.0",
    "@rails/activestorage": "^6.0.0",
    "@rails/ujs": "^6.0.0",
    "@rails/webpacker": "5.2.1",
    "turbolinks": "^5.2.0"
  },
  "version": "0.1.0",
  "devDependencies": {
    "webpack-dev-server": "^3.11.2"
  }
}

I add that configuration, but I got another error related with python-is-pyton3:

ARG BUILD_PACKAGES="git build-essential libpq-dev wget vim curl gzip xz-utils libsqlite3-dev python-is-python3 pkg-config"
==> 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 7.0s (13/25)
 => [internal] load remote build context                                                                                                                                                               0.0s
 => copy /context /                                                                                                                                                                                    0.1s
 => resolve image config for docker.io/docker/dockerfile:experimental                                                                                                                                  0.6s
 => 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
 => ERROR [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 -  5.8s
------
 > [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 -qq &&     apt-get install --no-install-recommends -y git build-essential libpq-dev wget vim curl gzip xz-utils libsqlite3-dev python-is-python3 pkg-config     && rm -rf /var/lib/apt/lists /var/cache/apt/archives:
#13 4.826 Reading package lists...
#13 5.536 Building dependency tree...
#13 5.719 Reading state information...
#13 5.797 E: Unable to locate package python-is-python3
------
Error failed to fetch an image or build from source: error building: executor failed running [/bin/bash -o pipefail -c apt-get update -qq &&     apt-get install --no-install-recommends -y ${BUILD_PACKAGES}     && rm -rf /var/lib/apt/lists /var/cache/apt/archives]: exit code: 100

My bad. I should have looked closer and saw that you were using Ruby 2.7.6. That docker image is based on an older release of Debian, so instead of python-is-python3, use simply python.

I tried using only python but I got this error:

#21 21.24 gyp verb extracted file from tarball include/node/v8-callbacks.h
#21 21.24 gyp verb tarball done parsing tarball
#21 21.24 gyp verb check download content checksum, need to download `SHASUMS256.txt`...
#21 21.24 gyp verb checksum url https://nodejs.org/download/release/v19.3.0/SHASUMS256.txt
#21 21.24 gyp http GET https://nodejs.org/download/release/v19.3.0/SHASUMS256.txt
#21 21.24 gyp http 200 https://nodejs.org/download/release/v19.3.0/SHASUMS256.txt
#21 21.24 gyp verb checksum data {"node-v19.3.0-aix-ppc64.tar.gz":"a5ff43eab40dfa812eeb804a7e064cc9e549e04347f0a0e2250a2a8253eaee6f","node-v19.3.0-darwin-arm64.tar.gz":"a50be904794d083fa8ecd4113845cea37968cbe3e5c1e758b0ec6215e1e7495e","node-v19.3.0-darwin-arm64.tar.xz":"9b4811af441296e61edfca3186bb694d99daa2ba4344041d4de891b9be587782","node-v19.3.0-darwin-x64.tar.gz":"d9692a5f153d2527ec43860e40fa0e77825543f554384aa8d26d33417ffb9069","node-v19.3.0-darwin-x64.tar.xz":"3bc9a06f53b48a5bb2f4b3d370d5ad6b53e3c36fada85f6850120130fde2a444","node-v19.3.0-headers.tar.gz":"40db0bd09a0e71f4447f15b485fc66715c55453c8e89c3b25872c1fdcd3ac29d","node-v19.3.0-headers.tar.xz":"e54e2a91c9959d59b7d27e1fa161a699aeca85da4a736891ca4c946573d9ee77","node-v19.3.0-linux-arm64.tar.gz":"f892b536b00f780aba42b7ccc8974e57e58c4f1de3f9c85d1bbf13c60c680974","node-v19.3.0-linux-arm64.tar.xz":"b9fbcd1d4433c073528abcac3d31347847e5ef229248cbe1dccca1a1379a5d2c","node-v19.3.0-linux-armv7l.tar.gz":"2c2ee707bcb93d5151ff0dbb5825060d364f0966dc5aab3fe58715d0e4527da8","node-v19.3.0-linux-armv7l.tar.xz":"494934a42eb76982b5cbbb84bef0726b828287a03fcf6bf05e78eaf2c8dab703","node-v19.3.0-linux-ppc64le.tar.gz":"d0d34510a7951afe4369876b671678ccd9bb11b7d24b07af10cabe464e371300","node-v19.3.0-linux-ppc64le.tar.xz":"662efb12dc05b603ea51b46224b7885a3a56be652282a6234a2a13e081ceb43b","node-v19.3.0-linux-s390x.tar.gz":"24578073d7339f9a6a8763df30e37bbf1caf3dbc44a6c6c6335c58c274d13b76","node-v19.3.0-linux-s390x.tar.xz":"17a1582063ad9b6a60aca5323de76df657d08fb3b2018a6786e1fa782f7f29b0","node-v19.3.0-linux-x64.tar.gz":"b525028ae5bb71b5b32cb7fce903ccce261dbfef4c7dd0f3e0ffc27cd6fc0b3f","node-v19.3.0-linux-x64.tar.xz":"de94d6db26edee92a03512552c8be9db38a7bfefa7b3228328afdfb5094e3a76","node-v19.3.0.pkg":"335daf080bf4763c42070b01d38159d91cb6ee0dd8cde813bbb99cff01faf23e","node-v19.3.0.tar.gz":"4dc4c4e0c510913ed6c4f37b516243ab96a2d98eff1b7d78cf8f8f8b6d415b98","node-v19.3.0.tar.xz":"d3189574ef9849c713822e7f31de7a1b9dd8a2c6b5fc78ddb811aaa259a22b1e","node-v19.3.0-win-x64.7z":"fdc3f9c0991a9e54640b792ceb758831f91f6384b0429149b8f3514fa2734e8c","node-v19.3.0-win-x64.zip":"9b93f6cb78e23a4cab9e401a8418daa9112bbf5bd3127642adf22cfdd4241348","node-v19.3.0-win-x86.7z":"2149012398fb720e1c6e79422344b8281bb4c90024461de3d72dcae06ad3d666","node-v19.3.0-win-x86.zip":"baf2de80f5c3f9bc679c3d377f48a0b98e75d12fa4f8ebea166883df7067b7b6","node-v19.3.0-x64.msi":"2efe9f3a91de1375ab581266f35fe89a779af8389b80612401ea6a28ed2dd16e","node-v19.3.0-x86.msi":"6eca60b54ff2a8fe6508b4d0beb0a316077c135d35e8223445a7c9a23fbd11ee","win-x64/node.exe":"c7a1db0fb60ffec3b06bfaa9c2d58778134c28258ecf75ab93968e536d364bf1","win-x64/node.lib":"fde595f3ac64db4522d934f4a4b09c6a11406d8e4f431c6b5374aac38041e6cf","win-x64/node_pdb.7z":"517ef6f4451280e59bccb77fe77bc3202e32938bad379b6626bf50f6e1fc88d7","win-x64/node_pdb.zip":"a428af310d552710e828d5ca41865c9cadf81d31a19297917098b45b5ab39c93","win-x86/node.exe":"32365d11881180435c0efac9d18e5ee396c75b2aef6cd1a3c30ec8c2322b6bb4","win-x86/node.lib":"dd1f1c3bbb3a6dd4c3ab1d5663688949580cd4ec24b523df23cab90cf666d391","win-x86/node_pdb.7z":"6a80d7c2930f1bf4fb894350da3194949bc1408b7aea1dd2f409d195148d755f","win-x86/node_pdb.zip":"233c08350135d2b572ac5067fa0cd1f8fb35b6770c2863f26f41b94ec574e798"}
#21 21.24 gyp verb download contents checksum {"node-v19.3.0-headers.tar.gz":"40db0bd09a0e71f4447f15b485fc66715c55453c8e89c3b25872c1fdcd3ac29d"}
#21 21.24 gyp verb validating download checksum for node-v19.3.0-headers.tar.gz (40db0bd09a0e71f4447f15b485fc66715c55453c8e89c3b25872c1fdcd3ac29d == 40db0bd09a0e71f4447f15b485fc66715c55453c8e89c3b25872c1fdcd3ac29d)
#21 21.24 gyp verb get node dir target node version installed: 19.3.0
#21 21.24 gyp verb build dir attempting to create "build" dir: /app/node_modules/node-sass/build
#21 21.24 gyp verb build dir "build" dir needed to be created? /app/node_modules/node-sass/build
#21 21.24 gyp verb build/config.gypi creating config file
#21 21.24 gyp verb build/config.gypi writing out config file: /app/node_modules/node-sass/build/config.gypi
#21 21.24 gyp verb config.gypi checking for gypi file: /app/node_modules/node-sass/config.gypi
#21 21.24 gyp verb common.gypi checking for gypi file: /app/node_modules/node-sass/common.gypi
#21 21.24 gyp verb gyp gyp format was not specified; forcing "make"
#21 21.24 gyp info spawn /usr/bin/python2
#21 21.24 gyp info spawn args [
#21 21.24 gyp info spawn args   '/app/node_modules/node-gyp/gyp/gyp_main.py',
#21 21.24 gyp info spawn args   'binding.gyp',
#21 21.24 gyp info spawn args   '-f',
#21 21.24 gyp info spawn args   'make',
#21 21.24 gyp info spawn args   '-I',
#21 21.24 gyp info spawn args   '/app/node_modules/node-sass/build/config.gypi',
#21 21.24 gyp info spawn args   '-I',
#21 21.24 gyp info spawn args   '/app/node_modules/node-gyp/addon.gypi',
#21 21.24 gyp info spawn args   '-I',
#21 21.24 gyp info spawn args   '/root/.node-gyp/19.3.0/include/node/common.gypi',
#21 21.24 gyp info spawn args   '-Dlibrary=shared_library',
#21 21.24 gyp info spawn args   '-Dvisibility=default',
#21 21.24 gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/19.3.0',
#21 21.24 gyp info spawn args   '-Dnode_gyp_dir=/app/node_modules/node-gyp',
#21 21.24 gyp info spawn args   '-Dnode_lib_file=/root/.node-gyp/19.3.0/<(target_arch)/node.lib',
#21 21.24 gyp info spawn args   '-Dmodule_root_dir=/app/node_modules/node-sass',
#21 21.24 gyp info spawn args   '-Dnode_engine=v8',
#21 21.24 gyp info spawn args   '--depth=.',
#21 21.24 gyp info spawn args   '--no-parallel',
#21 21.24 gyp info spawn args   '--generator-output',
#21 21.24 gyp info spawn args   'build',
#21 21.24 gyp info spawn args   '-Goutput_dir=.'
#21 21.24 gyp info spawn args ]
#21 21.24 gyp: Undefined variable standalone_static_library in binding.gyp while trying to load binding.gyp
#21 21.24 gyp ERR! configure error
#21 21.24 gyp ERR! stack Error: `gyp` failed with exit code: 1
#21 21.24 gyp ERR! stack     at ChildProcess.onCpExit (/app/node_modules/node-gyp/lib/configure.js:345:16)
#21 21.24 gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
#21 21.24 gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
#21 21.24 gyp ERR! System Linux 5.12.2
#21 21.24 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 21.24 gyp ERR! cwd /app/node_modules/node-sass
#21 21.24 gyp ERR! node -v v19.3.0
#21 21.24 gyp ERR! node-gyp -v v3.8.0
#21 21.24 gyp ERR! not ok
#21 21.24 Build failed with error code: 1
------
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```

This looks like a match: javascript - Failed doing npm install showing error "Undefined variable standalone_static_library in binding.gyp" and node-sass chokidar error - Stack Overflow

It looks like you are using Node 19.3.0. Can you try 18.12.1?

Yes, I try with 18, 17, and 16 but it doesn’t work. It returns this error using ARG NODE_VERSION=18.12.1:

Release/obj.target/libsass/src/libsass/src/values.o
#21 107.4   rm -rf "Release/sass.a" && cp -af "Release/obj.target/src/sass.a" "Release/sass.a"
#21 107.4   g++ '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/root/.node-gyp/18.12.1/include/node -I/root/.node-gyp/18.12.1/src -I/root/.node-gyp/18.12.1/deps/openssl/config -I/root/.node-gyp/18.12.1/deps/openssl/openssl/include -I/root/.node-gyp/18.12.1/deps/uv/include -I/root/.node-gyp/18.12.1/deps/zlib -I/root/.node-gyp/18.12.1/deps/v8/include -I../../nan -I../src/libsass/include  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++17 -std=c++0x -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw   -c -o Release/obj.target/binding/src/binding.o ../src/binding.cpp
#21 107.4 In file included from /root/.node-gyp/18.12.1/include/node/v8-local-handle.h:12,
#21 107.4                  from /root/.node-gyp/18.12.1/include/node/v8-array-buffer.h:12,
#21 107.4                  from /root/.node-gyp/18.12.1/include/node/v8.h:24,
#21 107.4                  from /root/.node-gyp/18.12.1/include/node/node.h:73,
#21 107.4                  from ../../nan/nan.h:56,
#21 107.4                  from ../src/binding.cpp:1:
#21 107.4 /root/.node-gyp/18.12.1/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
#21 107.4 /root/.node-gyp/18.12.1/include/node/v8-internal.h:646:38: error: ‘remove_cv_t’ is not a member of ‘std’
#21 107.4              !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
#21 107.4                                       ^~~~~~~~~~~
#21 107.4 /root/.node-gyp/18.12.1/include/node/v8-internal.h:646:38: note: suggested alternative: ‘remove_cv’
#21 107.4              !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
#21 107.4                                       ^~~~~~~~~~~
#21 107.4                                       remove_cv
#21 107.4 /root/.node-gyp/18.12.1/include/node/v8-internal.h:646:38: error: ‘remove_cv_t’ is not a member of ‘std’
#21 107.4 /root/.node-gyp/18.12.1/include/node/v8-internal.h:646:38: note: suggested alternative: ‘remove_cv’
#21 107.4              !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
#21 107.4                                       ^~~~~~~~~~~
#21 107.4                                       remove_cv
#21 107.4 /root/.node-gyp/18.12.1/include/node/v8-internal.h:646:50: error: template argument 2 is invalid
#21 107.4              !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
#21 107.4                                                   ^
#21 107.4 /root/.node-gyp/18.12.1/include/node/v8-internal.h:646:63: error: ‘::Perform’ has not been declared
#21 107.4              !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
#21 107.4                                                                ^~~~~~~
#21 107.4 /root/.node-gyp/18.12.1/include/node/v8-internal.h:646:63: note: suggested alternative: ‘herror’
#21 107.4              !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
#21 107.4                                                                ^~~~~~~
#21 107.4                                                                herror
#21 107.4 In file included from ../src/binding.cpp:1:
#21 107.4 ../../nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’:
#21 107.4 ../../nan/nan.h:2549:16: warning: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::Local<v8::AccessorSignature>, v8::SideEffectType, v8::SideEffectType)’ is deprecated: Do signature check in accessor [-Wdeprecated-declarations]
#21 107.4      , signature);
#21 107.4                 ^
#21 107.4 In file included from /root/.node-gyp/18.12.1/include/node/v8-function.h:15,
#21 107.4                  from /root/.node-gyp/18.12.1/include/node/v8.h:33,
#21 107.4                  from /root/.node-gyp/18.12.1/include/node/node.h:73,
#21 107.4                  from ../../nan/nan.h:56,
#21 107.4                  from ../src/binding.cpp:1:
#21 107.4 /root/.node-gyp/18.12.1/include/node/v8-template.h:838:8: note: declared here
#21 107.4    void SetAccessor(
#21 107.4         ^~~~~~~~~~~
#21 107.4 ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render(Nan::NAN_METHOD_ARGS_TYPE)’:
#21 107.4 ../src/binding.cpp:284:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
#21 107.4      int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
#21 107.4                                                                                                   ^~~~~~~~~~~~
#21 107.4 ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render_file(Nan::NAN_METHOD_ARGS_TYPE)’:
#21 107.4 ../src/binding.cpp:320:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
#21 107.4      int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
#21 107.4                                                                                                   ^~~~~~~~~~~~
#21 107.4 In file included from ../../nan/nan.h:56,
#21 107.4                  from ../src/binding.cpp:1:
#21 107.4 ../src/binding.cpp: At global scope:
#21 107.4 /root/.node-gyp/18.12.1/include/node/node.h:976:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
#21 107.4        (node::addon_register_func) (regfunc),                          \
#21 107.4                                            ^
#21 107.4 /root/.node-gyp/18.12.1/include/node/node.h:1010:3: note: in expansion of macro ‘NODE_MODULE_X’
#21 107.4    NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
#21 107.4    ^~~~~~~~~~~~~
#21 107.4 ../src/binding.cpp:358:1: note: in expansion of macro ‘NODE_MODULE’
#21 107.4  NODE_MODULE(binding, RegisterModule);
#21 107.4  ^~~~~~~~~~~
#21 107.4 make: *** [binding.target.mk:133: Release/obj.target/binding/src/binding.o] Error 1
#21 107.4 make: Leaving directory '/app/node_modules/node-sass/build'
#21 107.4 gyp ERR! build error
#21 107.4 gyp ERR! stack Error: `make` failed with exit code: 2
#21 107.4 gyp ERR! stack     at ChildProcess.onExit (/app/node_modules/node-gyp/lib/build.js:262:23)
#21 107.4 gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
#21 107.4 gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
#21 107.4 gyp ERR! System Linux 5.12.2
#21 107.4 gyp ERR! command "/root/.volta/tools/image/node/18.12.1/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
#21 107.4 gyp ERR! cwd /app/node_modules/node-sass
#21 107.4 gyp ERR! node -v v18.12.1
#21 107.4 gyp ERR! node-gyp -v v3.8.0
#21 107.4 gyp ERR! not ok
#21 107.4 Build failed with error code: 1
------
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```