briefkasten: Error in docker build

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.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (12 by maintainers)

Most upvoted comments

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