ndom91/briefkasten

Error in docker build

shubhank-saxena opened this issue · 19 comments

Describe the bug

.../node_modules/bufferutil install: gyp ERR! find Python
.../node_modules/bufferutil install: gyp ERR! find Python Python is not set from command line or npm configuration
.../node_modules/bufferutil install: gyp ERR! find Python Python is not set from environment variable PYTHON
.../node_modules/bufferutil install: gyp ERR! find Python checking if "python3" can be used
.../node_modules/bufferutil install: gyp ERR! find Python - "python3" is not in PATH or produced an error
.../node_modules/bufferutil install: gyp ERR! find Python checking if "python" can be used
.../node_modules/bufferutil install: gyp ERR! find Python - "python" is not in PATH or produced an error
.../node_modules/bufferutil install: gyp ERR! find Python
.../node_modules/bufferutil install: gyp ERR! find Python **********************************************************
.../node_modules/bufferutil install: gyp ERR! find Python You need to install the latest version of Python.
.../node_modules/bufferutil install: gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
.../node_modules/bufferutil install: gyp ERR! find Python you can try one of the following options:
.../node_modules/bufferutil install: gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
.../node_modules/bufferutil install: gyp ERR! find Python   (accepted by both node-gyp and npm)
.../node_modules/bufferutil install: gyp ERR! find Python - Set the environment variable PYTHON
.../node_modules/bufferutil install: gyp ERR! find Python - Set the npm configuration variable python:
.../node_modules/bufferutil install: gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
.../node_modules/bufferutil install: gyp ERR! find Python For more information consult the documentation at:
.../node_modules/bufferutil install: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
.../node_modules/bufferutil install: gyp ERR! find Python **********************************************************
.../node_modules/bufferutil install: gyp ERR! find Python
.../node_modules/bufferutil install: gyp ERR! configure error
.../node_modules/bufferutil install: gyp ERR! stack Error: Could not find any Python installation to use
.../node_modules/bufferutil install: gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:330:47)
.../node_modules/bufferutil install: gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:159:21)
.../node_modules/bufferutil install: gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:202:16)
.../node_modules/bufferutil install: gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:294:16)
.../node_modules/bufferutil install: gyp ERR! stack     at exithandler (node:child_process:408:5)
.../node_modules/bufferutil install: gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:420:5)
.../node_modules/bufferutil install: gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
.../node_modules/bufferutil install: gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
.../node_modules/bufferutil install: gyp ERR! stack     at onErrorNT (node:internal/child_process:478:16)
.../node_modules/bufferutil install: gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
.../node_modules/bufferutil install: gyp ERR! System Linux 5.15.61-v8+
.../node_modules/bufferutil install: gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
.../node_modules/bufferutil install: gyp ERR! cwd /app/node_modules/.pnpm/bufferutil@4.0.6/node_modules/bufferutil
.../node_modules/bufferutil install: gyp ERR! node -v v16.17.0
.../node_modules/bufferutil install: gyp ERR! node-gyp -v v9.1.0
.../node_modules/bufferutil install: gyp ERR! not ok
.../node_modules/bufferutil install: Failed
 ELIFECYCLE  Command failed with exit code 1.
The command '/bin/sh -c pnpm install --frozen-lockfile' returned a non-zero code: 1
ERROR: Service 'app' failed to build : Build failed

Reproduction

Docker building

System Info

System:
    OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (4) arm64 unknown
    Memory: 405.04 MB / 3.72 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 14.20.1 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 6.14.17 - /usr/bin/npm
  Browsers:
    Firefox: 102.3.0esr

Used Package Manager

pnpm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Have you made any changes to the Dockerfile or anythign else? Can't imagine why python would be necessary to build any of the dependencies here 🤔

Have you made any changes to the Dockerfile or anythign else? Can't imagine why python would be necessary to build any of the dependencies here 🤔

Hello. No changes. Just ran the fresh clone

@shubhank-saxena okay can you give me some steps to reproduce?

You just cloned the repo, ran docker-compose up and thats all?

Yes. Followed exact instructions from https://github.com/ndom91/briefkasten#-docker

I had the same experience with this, running docker-compose up from a fresh checkout. While I had the container up and running, I connected to a shell on it and sure enough, there's no Python install. I then added apt-get update && apt-get install python3 to the build script, which then necessitated adding gcc, make, g++, and that was about the point where I gave up — it was obvious it was trying to compile a bunch of content from scratch.

Important point - I'm running the above on an M1 Mac, and I notice @shubhank-saxena is running on an ARM platform as well (arm64). Two possibilities here: one is that a necessary library in the stack is lacking an ARM64 version, so it's trying to compile it from scratch instead of using what's there (I've seen this happen when sharing a project between arm64 and x64 laptops — npm would keep rebuilding the stack because the local package copies are for the wrong arch). Another possibility is that the node:16-bullseye-slim is the culprit - looking at this issue from prisma, for instance, it looks like there are some issues with the -slim image on arm64 that might not occur with node:16-bullseye for instance. I did try changing the build to use node:16-bullseye, however, and no dice.

Worth noting as well that pulling the pre-built container you released (ndom91/briefkasten) works on my M1 running in x64/Rosetta mode (it produces an error after starting up, but that's another thing, I think).

@jospurvis thanks for the detailed feedback!

Yeah so based on what you all have mentioned, it also sounds to me like its tryign to recompile from scratch some dependency for arm64.

I do have access to an M1 Macbook, so can take a look at this this weekend hopefully 👍 🤞

When will the fix on the docker file be updated? :)

Hopefully this weekend, but don't want to give any fixed dates. If yuo know exactly what the problem is and are willing to put up a PR, I'd be more than happy to review it 😁

Alright so the current Dockerfile in main seems to be able to built and run without a problem on my system (x86_64 linux desktop).

I do have an M1 Macbook though so let me double check there 🤔

Sorry this took so long! But I've just merged a PR (#29) to fix this.

It now built successfully on both my x86_64 desktop linux machine as well as my M1 Macbook Pro. I also updated the published image on docker hub (ndom91/briefkasten) 🥳

I think you forgot to update for ARM processors :P

[+] Building 20.7s (10/21)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 34B 0.0s
=> [internal] load metadata for docker.io/library/node:16-bullseye-slim 20.6s
=> [release 1/11] FROM docker.io/library/node:16-bullseye-slim@sha256:761f2925e5c7 0.0s
=> => resolve docker.io/library/node:16-bullseye-slim@sha256:761f2925e5c7e303b662a1 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 6.84kB 0.0s
=> CACHED [release 2/11] WORKDIR /app 0.0s
=> CACHED [release 3/11] RUN npm install -g pnpm; pnpm --version; pnpm setup; 0.0s
=> CACHED [release 4/11] RUN addgroup --system --gid 1001 nodejs 0.0s
=> CACHED [release 5/11] RUN adduser --system --uid 1001 nextjs 0.0s
=> CACHED [dependencies 4/5] COPY package.json pnpm-lock.yaml prisma ./ 0.0s
=> ERROR [dependencies 5/5] RUN pnpm install --frozen-lockfile 19.8s


[dependencies 5/5] RUN pnpm install --frozen-lockfile:
#0 0.805 Lockfile is up to date, resolution step is skipped
#0 0.895 Progress: resolved 1, reused 0, downloaded 0, added 0
#0 1.146 Packages: +944
#0 1.146 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#0 1.188
#0 1.188 ╭──────────────────────────────────────────────────────────────────╮
#0 1.188 │ │
#0 1.188 │ Update available! 7.18.0 → 7.18.1. │
#0 1.188 │ Changelog: https://github.com/pnpm/pnpm/releases/tag/v7.18.1
#0 1.188 │ Run "pnpm add -g pnpm" to update. │
#0 1.188 │ │
#0 1.188 │ Follow @pnpmjs for updates: https://twitter.com/pnpmjs
#0 1.188 │ │
#0 1.188 ╰──────────────────────────────────────────────────────────────────╯
#0 1.188
#0 1.621 Packages are hard linked from the content-addressable store to the virtual store.
#0 1.621 Content-addressable store is at: /root/.local/share/pnpm/store/v3
#0 1.621 Virtual store is at: node_modules/.pnpm
#0 1.904 Progress: resolved 944, reused 0, downloaded 14, added 11
#0 2.911 Progress: resolved 944, reused 0, downloaded 48, added 47
#0 3.917 Progress: resolved 944, reused 0, downloaded 136, added 135
#0 4.919 Progress: resolved 944, reused 0, downloaded 267, added 258
#0 5.920 Progress: resolved 944, reused 0, downloaded 324, added 323
#0 6.921 Progress: resolved 944, reused 0, downloaded 337, added 334
#0 7.927 Progress: resolved 944, reused 0, downloaded 413, added 410
#0 8.932 Progress: resolved 944, reused 0, downloaded 490, added 487
#0 9.932 Progress: resolved 944, reused 0, downloaded 624, added 623
#0 10.94 Progress: resolved 944, reused 0, downloaded 660, added 657
#0 11.95 Progress: resolved 944, reused 0, downloaded 766, added 766
#0 12.96 Progress: resolved 944, reused 0, downloaded 822, added 819
#0 13.96 Progress: resolved 944, reused 0, downloaded 879, added 878
#0 14.97 Progress: resolved 944, reused 0, downloaded 918, added 915
#0 15.96 Progress: resolved 944, reused 0, downloaded 939, added 939
#0 16.96 Progress: resolved 944, reused 0, downloaded 944, added 943
#0 17.56 .../node_modules/@prisma/engines postinstall$ node scripts/postinstall.js
#0 17.60 .../node_modules/core-js-pure postinstall$ node -e "try{require('./postinstall')}catch(e){}"
#0 17.64 .../es5-ext@0.10.61/node_modules/es5-ext postinstall$ node -e "try{require('./_postinstall')}catch(e){}" || exit 0
#0 17.67 .../node_modules/@sentry/cli install$ node ./scripts/install.js
#0 17.71 .../node_modules/core-js-pure postinstall: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
#0 17.71 .../node_modules/core-js-pure postinstall: The project needs your help! Please consider supporting of core-js:
#0 17.71 .../node_modules/core-js-pure postinstall: > https://opencollective.com/core-js
#0 17.71 .../node_modules/core-js-pure postinstall: > https://patreon.com/zloirock
#0 17.71 .../node_modules/core-js-pure postinstall: > bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz
#0 17.71 .../node_modules/core-js-pure postinstall: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
#0 17.72 .../node_modules/core-js-pure postinstall: Done
#0 17.77 .../es5-ext@0.10.61/node_modules/es5-ext postinstall: Done
#0 17.82 .../node_modules/bufferutil install$ node-gyp-build
#0 17.86 .../node_modules/@prisma/engines postinstall: Done
#0 17.92 .../node_modules/@sentry/cli install: info sentry-cli Downloading from https://downloads.sentry-cdn.com/sentry-cli/1.74.5/sentry-cli-Linux-aarch64
#0 17.93 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 1%
#0 17.93 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 2%
#0 17.93 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 3%
#0 17.93 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 4%
#0 17.93 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 5%
#0 17.93 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 6%
#0 17.93 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 7%
#0 17.93 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 8%
#0 17.94 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 9%
#0 17.94 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 10%
#0 17.95 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 11%
#0 17.95 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 12%
#0 17.95 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 13%
#0 17.95 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 14%
#0 17.95 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 15%
#0 17.96 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 16%
#0 17.96 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 17%
#0 17.96 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 18%
#0 17.96 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 19%
#0 17.96 Progress: resolved 944, reused 0, downloaded 944, added 944, done
#0 17.96 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 20%
#0 17.96 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 21%
#0 17.97 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 22%
#0 17.97 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 23%
#0 17.97 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 24%
#0 17.98 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 25%
#0 18.00 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 26%
#0 18.00 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 27%
#0 18.00 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 28%
#0 18.00 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 29%
#0 18.00 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 30%
#0 18.00 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 31%
#0 18.00 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 32%
#0 18.00 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 33%
#0 18.00 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 34%
#0 18.00 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 35%
#0 18.00 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 36%
#0 18.01 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 37%
#0 18.01 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 38%
#0 18.02 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 39%
#0 18.03 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 40%
#0 18.03 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 41%
#0 18.04 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 42%
#0 18.04 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 43%
#0 18.04 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 44%
#0 18.04 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 45%
#0 18.05 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 46%
#0 18.05 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 47%
#0 18.05 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 48%
#0 18.05 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 49%
#0 18.06 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 50%
#0 18.06 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 51%
#0 18.06 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 52%
#0 18.06 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 53%
#0 18.07 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 54%
#0 18.07 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 55%
#0 18.07 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 56%
#0 18.07 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 57%
#0 18.07 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 58%
#0 18.07 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 59%
#0 18.08 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 60%
#0 18.08 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 61%
#0 18.08 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 62%
#0 18.08 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 63%
#0 18.09 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 64%
#0 18.09 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 65%
#0 18.09 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 66%
#0 18.09 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 67%
#0 18.10 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 68%
#0 18.10 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 69%
#0 18.10 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 70%
#0 18.11 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 71%
#0 18.11 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 72%
#0 18.11 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 73%
#0 18.11 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 74%
#0 18.13 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 75%
#0 18.13 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 76%
#0 18.13 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 77%
#0 18.13 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 78%
#0 18.14 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 79%
#0 18.14 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 80%
#0 18.14 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 81%
#0 18.15 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 82%
#0 18.15 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 83%
#0 18.15 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 84%
#0 18.16 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 85%
#0 18.16 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 86%
#0 18.16 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 87%
#0 18.17 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 88%
#0 18.17 .../node_modules/bufferutil install: gyp info it worked if it ends with ok
#0 18.17 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 89%
#0 18.17 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 90%
#0 18.18 .../node_modules/bufferutil install: gyp info using node-gyp@9.3.0
#0 18.18 .../node_modules/bufferutil install: gyp info using node@16.18.1 | linux | arm64
#0 18.18 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 91%
#0 18.18 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 92%
#0 18.18 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 93%
#0 18.19 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 94%
#0 18.19 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 95%
#0 18.19 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 96%
#0 18.19 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 97%
#0 18.20 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 98%
#0 18.21 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 99%
#0 18.21 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 100%
#0 18.24 .../node_modules/@sentry/cli install: info Checksum validation passed.
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python Python is not set from command line or npm configuration
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python Python is not set from environment variable PYTHON
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python checking if "python3" can be used
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python - "python3" is not in PATH or produced an error
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python checking if "python" can be used
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python - "python" is not in PATH or produced an error
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python **********************************************************
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python You need to install the latest version of Python.
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python you can try one of the following options:
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python (accepted by both node-gyp and npm)
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python - Set the environment variable PYTHON
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python - Set the npm configuration variable python:
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python For more information consult the documentation at:
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python **********************************************************
#0 18.27 .../node_modules/bufferutil install: gyp ERR! find Python
#0 18.27 .../node_modules/bufferutil install: gyp ERR! configure error
#0 18.27 .../node_modules/bufferutil install: gyp ERR! stack Error: Could not find any Python installation to use
#0 18.27 .../node_modules/bufferutil install: gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:330:47)
#0 18.27 .../node_modules/bufferutil install: gyp ERR! stack at PythonFinder.runChecks (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:159:21)
#0 18.27 .../node_modules/bufferutil install: gyp ERR! stack at PythonFinder. (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:202:16)
#0 18.28 .../node_modules/bufferutil install: gyp ERR! stack at PythonFinder.execFileCallback (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:294:16)
#0 18.28 .../node_modules/bufferutil install: gyp ERR! stack at exithandler (node:child_process:410:5)
#0 18.28 .../node_modules/bufferutil install: gyp ERR! stack at ChildProcess.errorhandler (node:child_process:422:5)
#0 18.28 .../node_modules/bufferutil install: gyp ERR! stack at ChildProcess.emit (node:events:513:28)
#0 18.28 .../node_modules/bufferutil install: gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
#0 18.28 .../node_modules/bufferutil install: gyp ERR! stack at onErrorNT (node:internal/child_process:485:16)
#0 18.28 .../node_modules/bufferutil install: gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
#0 18.28 .../node_modules/bufferutil install: gyp ERR! System Linux 6.0.0-0.deb11.2-arm64
#0 18.28 .../node_modules/bufferutil install: gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
#0 18.28 .../node_modules/bufferutil install: gyp ERR! cwd /app/node_modules/.pnpm/bufferutil@4.0.6/node_modules/bufferutil
#0 18.28 .../node_modules/bufferutil install: gyp ERR! node -v v16.18.1
#0 18.28 .../node_modules/bufferutil install: gyp ERR! node-gyp -v v9.3.0
#0 18.28 .../node_modules/bufferutil install: gyp ERR! not ok
#0 18.29 .../node_modules/bufferutil install: Failed
#0 18.29  ELIFECYCLE  Command failed with exit code 1.


failed to solve: executor failed running [/bin/sh -c pnpm install --frozen-lockfile]: exit code: 1

I think you forgot to update for ARM processors :P

...

failed to solve: executor failed running [/bin/sh -c pnpm install --frozen-lockfile]: exit code: 1

So I definitely tested this on my m1 macbook and it worked there. Is that where your running this? Or some other arm platform like raspberry pi?

Can you provide some more details? I'll take a look 👍

I think you forgot to update for ARM processors :P

...

failed to solve: executor failed running [/bin/sh -c pnpm install --frozen-lockfile]: exit code: 1

So I definitely tested this on my m1 macbook and it worked there. Is that where your running this? Or some other arm platform like raspberry pi?

Can you provide some more details? I'll take a look 👍

Running it on oracle [Ampere A1 Compute]

I think you forgot to update for ARM processors :P

...

failed to solve: executor failed running [/bin/sh -c pnpm install --frozen-lockfile]: exit code: 1

So I definitely tested this on my m1 macbook and it worked there. Is that where your running this? Or some other arm platform like raspberry pi?
Can you provide some more details? I'll take a look +1

Running it on oracle [Ampere A1 Compute]

Ahh you know what, I had set the PR to "automerge when tests complete", but it never did merge 🤦

Just merged that PR to main now. Please try again 😁

I think you forgot to update for ARM processors :P

...

failed to solve: executor failed running [/bin/sh -c pnpm install --frozen-lockfile]: exit code: 1

So I definitely tested this on my m1 macbook and it worked there. Is that where your running this? Or some other arm platform like raspberry pi?
Can you provide some more details? I'll take a look +1

Running it on oracle [Ampere A1 Compute]

Ahh you know what, I had set the PR to "automerge when tests complete", but it never did merge 🤦

Just merged that PR to main now. Please try again 😁

#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python Python is not set from command line or npm configuration
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python Python is not set from environment variable PYTHON
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python checking if "python3" can be used
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python - "python3" is not in PATH or produced an error
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python checking if "python" can be used
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python - "python" is not in PATH or produced an error
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python **********************************************************
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python You need to install the latest version of Python.
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python you can try one of the following options:
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python (accepted by both node-gyp and npm)
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python - Set the environment variable PYTHON
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python - Set the npm configuration variable python:
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python For more information consult the documentation at:
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python **********************************************************
#0 17.58 .../node_modules/bufferutil install: gyp ERR! find Python
#0 17.58 .../node_modules/bufferutil install: gyp ERR! configure error
#0 17.58 .../node_modules/bufferutil install: gyp ERR! stack Error: Could not find any Python installation to use
#0 17.58 .../node_modules/bufferutil install: gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:330:47)
#0 17.58 .../node_modules/bufferutil install: gyp ERR! stack at PythonFinder.runChecks (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:159:21)
#0 17.58 .../node_modules/bufferutil install: gyp ERR! stack at PythonFinder. (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:202:16)
#0 17.58 .../node_modules/bufferutil install: gyp ERR! stack at PythonFinder.execFileCallback (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:294:16)
#0 17.58 .../node_modules/bufferutil install: gyp ERR! stack at exithandler (node:child_process:410:5)
#0 17.58 .../node_modules/bufferutil install: gyp ERR! stack at ChildProcess.errorhandler (node:child_process:422:5)
#0 17.58 .../node_modules/bufferutil install: gyp ERR! stack at ChildProcess.emit (node:events:513:28)
#0 17.58 .../node_modules/bufferutil install: gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
#0 17.58 .../node_modules/bufferutil install: gyp ERR! stack at onErrorNT (node:internal/child_process:485:16)
#0 17.58 .../node_modules/bufferutil install: gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
#0 17.59 .../node_modules/bufferutil install: gyp ERR! System Linux 6.0.0-0.deb11.2-arm64
#0 17.59 .../node_modules/bufferutil install: gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
#0 17.59 .../node_modules/bufferutil install: gyp ERR! cwd /app/node_modules/.pnpm/bufferutil@4.0.6/node_modules/bufferutil
#0 17.59 .../node_modules/bufferutil install: gyp ERR! node -v v16.18.1
#0 17.59 .../node_modules/bufferutil install: gyp ERR! node-gyp -v v9.3.0
#0 17.59 .../node_modules/bufferutil install: gyp ERR! not ok
#0 17.59 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 41%
#0 17.59 .../node_modules/bufferutil install: Failed
#0 17.59  ELIFECYCLE  Command failed with exit code 1.
#0 17.59 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 42%
#0 17.59 .../node_modules/@sentry/cli install: fetching sentry-cli-Linux-aarch64 43%
failed to solve: executor failed running [/bin/sh -c pnpm install --frozen-lockfile]: exit code: 1


Still getting the same error.

Are you sure you're using the latest main?

I've explicitly added python3 to the dependencies Dockerfile stage (see: 70e685b#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R23) which fixed this issue for me locally on an M1 Macbook (arm64)

Are you sure you're using the latest main?

I've explicitly added python3 to the dependencies Dockerfile stage (see: 70e685b#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R23) which fixed this issue for me locally on an M1 Macbook (arm64)

Ah, my bad, I manage to get docker running now. However the applying the database schema will result in an error

Error: Unknown binaryTarget linux-arm64-openssl-undefined and no custom engine files were provided
 ELIFECYCLE  Command failed with exit code 1.

I believe it's due to the lack of ssl libraries. Some slim Docker images no longer come with a SSL library installed by default in order to keep the image as small as possible.

You might need to add this to the docker file.

RUN apt-get update
RUN apt-get install -y openssl

Yeah so I added that exact thing but only in the build Docker stage, for prisma generate. See the same PR I linked previously.

When is that happening specifically? When seeding the db / applying initial migrations? I think I know what needs to be changed then. We'll also need to include openssl in the release Docker stage. Thanks for the heads up!

EDIT: @iamnhx just pushed the update to main. Will update the latest Docker image on docker hub as well in 2 min 👍

It was during the pnpm db:push, after your update, everything is working perfectly now. Cheers!