Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create birth with docker - fails because of missing python #499

Open
negue opened this issue Jul 23, 2023 · 1 comment
Open

create birth with docker - fails because of missing python #499

negue opened this issue Jul 23, 2023 · 1 comment
Labels
bug Indicates an unexpected problem or unintended behavior.

Comments

@negue
Copy link

negue commented Jul 23, 2023

Specs

  • Leon version: none yet
  • OS (or browser) version: Mac M1 13.4.1
  • Node.js version: 16.18.1
  • Complete "leon check" (or "npm run check") output:
  • (if using Docker) Complete "npm run docker:check" output:
  • (optional) Leon skill version:

Expected Behavior

leon create birth --docker --develop can install and create the docker image

Actual Behavior

fails with: see Error Log

#16 399.0 npm ERR! code 1
#16 399.0 npm ERR! path /home/docker/leon/node_modules/bufferutil
#16 399.0 npm ERR! command failed
#16 399.0 npm ERR! command sh -c -- node-gyp-build
#16 399.0 npm ERR! gyp info it worked if it ends with ok
#16 399.0 npm ERR! gyp info using node-gyp@9.1.0
#16 399.0 npm ERR! gyp info using node@16.18.0 | linux | arm64
#16 399.0 npm ERR! gyp ERR! find Python 
#16 399.0 npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
#16 399.0 npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
#16 399.0 npm ERR! gyp ERR! find Python checking if "python3" can be used
#16 399.0 npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
#16 399.0 npm ERR! gyp ERR! find Python checking if "python" can be used
#16 399.0 npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
#16 399.0 npm ERR! gyp ERR! find Python 
#16 399.0 npm ERR! gyp ERR! find Python **********************************************************
#16 399.0 npm ERR! gyp ERR! find Python You need to install the latest version of Python.
#16 399.0 npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#16 399.0 npm ERR! gyp ERR! find Python you can try one of the following options:
#16 399.0 npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#16 399.0 npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
#16 399.0 npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
#16 399.0 npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
#16 399.0 npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
#16 399.0 npm ERR! gyp ERR! find Python For more information consult the documentation at:
#16 399.0 npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#16 399.0 npm ERR! gyp ERR! find Python **********************************************************
#16 399.0 npm ERR! gyp ERR! find Python 
#16 399.0 npm ERR! gyp ERR! configure error 
#16 399.0 npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
#16 399.0 npm ERR! gyp ERR! stack     at PythonFinder.fail (/home/docker/.nvm/versions/node/v16.18.0/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
#16 399.0 npm ERR! gyp ERR! stack     at PythonFinder.runChecks (/home/docker/.nvm/versions/node/v16.18.0/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
#16 399.0 npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/home/docker/.nvm/versions/node/v16.18.0/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
#16 399.0 npm ERR! gyp ERR! stack     at PythonFinder.execFileCallback (/home/docker/.nvm/versions/node/v16.18.0/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
#16 399.0 npm ERR! gyp ERR! stack     at exithandler (node:child_process:410:5)
#16 399.0 npm ERR! gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:422:5)
#16 399.0 npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
#16 399.0 npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
#16 399.0 npm ERR! gyp ERR! stack     at onErrorNT (node:internal/child_process:485:16)
#16 399.0 npm ERR! gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
#16 399.0 npm ERR! gyp ERR! System Linux 6.3.12-orbstack-00210-ga4f4fae8883e
#16 399.0 npm ERR! gyp ERR! command "/home/docker/.nvm/versions/node/v16.18.0/bin/node" "/home/docker/.nvm/versions/node/v16.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
#16 399.0 npm ERR! gyp ERR! cwd /home/docker/leon/node_modules/bufferutil
#16 399.0 npm ERR! gyp ERR! node -v v16.18.0
#16 399.0 npm ERR! gyp ERR! node-gyp -v v9.1.0
#16 399.0 npm ERR! gyp ERR! not ok
#16 399.0 
#16 399.0 npm ERR! A complete log of this run can be found in:
#16 399.0 npm ERR!     /home/docker/.npm/_logs/2023-07-23T02_00_14_670Z-debug-0.log
#16 ERROR: process "/bin/sh -c npm install" did not complete successfully: exit code: 1
------
 > [12/13] RUN npm install:
399.0 npm ERR! gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
399.0 npm ERR! gyp ERR! System Linux 6.3.12-orbstack-00210-ga4f4fae8883e
399.0 npm ERR! gyp ERR! command "/home/docker/.nvm/versions/node/v16.18.0/bin/node" "/home/docker/.nvm/versions/node/v16.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
399.0 npm ERR! gyp ERR! cwd /home/docker/leon/node_modules/bufferutil
399.0 npm ERR! gyp ERR! node -v v16.18.0
399.0 npm ERR! gyp ERR! node-gyp -v v9.1.0
399.0 npm ERR! gyp ERR! not ok
399.0 
399.0 npm ERR! A complete log of this run can be found in:
399.0 npm ERR!     /home/docker/.npm/_logs/2023-07-23T02_00_14_670Z-debug-0.log
------
Dockerfile:57
--------------------
  55 |     USER docker
  56 |     COPY --chown=docker ./ ./
  57 | >>> RUN npm install
  58 |     RUN npm run build
  59 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install" did not complete successfully: exit code: 1

How Do We Reproduce?

Probably just happens on an M1 Mac due to the Arm CPU it could be that ubuntu base image is missing the python3 package

After adding it the npm installation part worked

Extra (like a sample repo to reproduce the issue, etc.)

@negue negue added the bug Indicates an unexpected problem or unintended behavior. label Jul 23, 2023
@SunTrustDev
Copy link

SunTrustDev commented Jul 1, 2024

I confirm this bug while building a docker image with arm64 target.

1226.1 npm ERR! gyp ERR! find Python
1226.1 npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
1226.1 npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
1226.1 npm ERR! gyp ERR! find Python checking if "python3" can be used
1226.1 npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
1226.1 npm ERR! gyp ERR! find Python checking if "python" can be used
1226.1 npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
1226.1 npm ERR! gyp ERR! find Python
1226.1 npm ERR! gyp ERR! find Python **********************************************************
1226.1 npm ERR! gyp ERR! find Python You need to install the latest version of Python.
1226.1 npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
1226.1 npm ERR! gyp ERR! find Python you can try one of the following options:
1226.1 npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
1226.1 npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
1226.1 npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
1226.1 npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
1226.1 npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
1226.1 npm ERR! gyp ERR! find Python For more information consult the documentation at:
1226.1 npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
1226.1 npm ERR! gyp ERR! find Python **********************************************************

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior.
Projects
None yet
Development

No branches or pull requests

2 participants