Webapps depending on node-gyp don't build #899

Open
opened 2024-07-30 14:52:43 +00:00 by dboreham · 1 comment
Owner

Because it depends on Python:

[5/5] Building fresh packages...
error /app/node_modules/@metamask/sdk/node_modules/utf-8-validate: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments: 
Directory: /app/node_modules/@metamask/sdk/node_modules/utf-8-validate
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@10.1.0
gyp info using node@20.11.1 | linux | x64
gyp ERR! find Python 
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - executable path is ""
gyp ERR! find Python - "" could not be run
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - executable path is ""
gyp ERR! find Python - "" could not be run
gyp ERR! find Python 
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python 
gyp ERR! configure error 
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (/app/node_modules/node-gyp/lib/find-python.js:306:11)
gyp ERR! stack at PythonFinder.findPython (/app/node_modules/node-gyp/lib/find-python.js:164:17)
gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
gyp ERR! stack at async configure (/app/node_modules/node-gyp/lib/configure.js:27:18)
gyp ERR! stack at async run (/app/node_modules/node-gyp/bin/node-gyp.js:81:18)
gyp ERR! System Linux 5.15.0-1051-kvm
gyp ERR! command "/usr/local/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /app/node_modules/@metamask/sdk/node_modules/utf-8-validate
gyp ERR! node -v v20.11.1
gyp ERR! node-gyp -v v10.1.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Because it depends on Python: ``` [5/5] Building fresh packages... error /app/node_modules/@metamask/sdk/node_modules/utf-8-validate: Command failed. Exit code: 1 Command: node-gyp-build Arguments: Directory: /app/node_modules/@metamask/sdk/node_modules/utf-8-validate Output: gyp info it worked if it ends with ok gyp info using node-gyp@10.1.0 gyp info using node@20.11.1 | linux | x64 gyp ERR! find Python gyp ERR! find Python Python is not set from command line or npm configuration gyp ERR! find Python Python is not set from environment variable PYTHON gyp ERR! find Python checking if "python3" can be used gyp ERR! find Python - executable path is "" gyp ERR! find Python - "" could not be run gyp ERR! find Python checking if "python" can be used gyp ERR! find Python - executable path is "" gyp ERR! find Python - "" could not be run gyp ERR! find Python gyp ERR! find Python ********************************************************** gyp ERR! find Python You need to install the latest version of Python. gyp ERR! find Python Node-gyp should be able to find and use Python. If not, gyp ERR! find Python you can try one of the following options: gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable" gyp ERR! find Python (accepted by both node-gyp and npm) gyp ERR! find Python - Set the environment variable PYTHON gyp ERR! find Python - Set the npm configuration variable python: gyp ERR! find Python npm config set python "/path/to/pythonexecutable" gyp ERR! find Python For more information consult the documentation at: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation gyp ERR! find Python ********************************************************** gyp ERR! find Python gyp ERR! configure error gyp ERR! stack Error: Could not find any Python installation to use gyp ERR! stack at PythonFinder.fail (/app/node_modules/node-gyp/lib/find-python.js:306:11) gyp ERR! stack at PythonFinder.findPython (/app/node_modules/node-gyp/lib/find-python.js:164:17) gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5) gyp ERR! stack at async configure (/app/node_modules/node-gyp/lib/configure.js:27:18) gyp ERR! stack at async run (/app/node_modules/node-gyp/bin/node-gyp.js:81:18) gyp ERR! System Linux 5.15.0-1051-kvm gyp ERR! command "/usr/local/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /app/node_modules/@metamask/sdk/node_modules/utf-8-validate gyp ERR! node -v v20.11.1 gyp ERR! node-gyp -v v10.1.0 gyp ERR! not ok info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. ```
Author
Owner

Little strange that a web app is using a dependency via node-gyp because you can't run native modules in the browser.

Little strange that a web app is using a dependency via node-gyp because you can't run native modules in the browser.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#899
No description provided.