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

python deps is missing for node build stage #1206

Open
mattwang44 opened this issue Jul 20, 2024 · 0 comments
Open

python deps is missing for node build stage #1206

mattwang44 opened this issue Jul 20, 2024 · 0 comments
Labels
triage needed The bug report may be just filed. Please triage it.

Comments

@mattwang44
Copy link
Member

Description

#1195 把 Debian package 的 python3-pip 拔掉後,發現我在 macOS build docker 還是會被要求需要 python 而噴錯;然而在 linux (GitHub codespace) 上執行不會有問題(所以不用急著解)。

Details
> docker-compose -f docker-compose-dev.yml up   
WARN[0000] /Users/wangwei-hsiang/repos/p/pycon.tw/docker-compose-dev.yml: `version` is obsolete 
[+] Building 11.3s (14/20)                                                                                                                      docker:desktop-linux
 => [pycontw internal] load build definition from Dockerfile                                                                                                    0.0s
 => => transferring dockerfile: 2.43kB                                                                                                                          0.0s
 => [pycontw internal] load metadata for docker.io/library/python:3.10.14-slim-bullseye                                                                         0.7s
 => [pycontw internal] load metadata for docker.io/library/node:20.11.0-bullseye-slim                                                                           0.7s
 => [pycontw internal] load .dockerignore                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                 0.0s
 => [pycontw python_base 1/1] FROM docker.io/library/python:3.10.14-slim-bullseye@sha256:bcf593ef8a7d2ff9d81b0f1add6683faa17411cd6cb9c084e463b659337ac3f2       0.0s
 => [pycontw node_base 1/1] FROM docker.io/library/node:20.11.0-bullseye-slim@sha256:21fe81f52728a8fdcb1220be67a0dd2eca0c2603d84f7afbe73b6ad22c10e14b           0.0s
 => [pycontw internal] load build context                                                                                                                       0.0s
 => => transferring context: 130B                                                                                                                               0.0s
 => CACHED [pycontw python_deps 1/6] RUN apt-get update                                                                                                         0.0s
 => CACHED [pycontw python_deps 2/6] RUN apt-get upgrade -y                                                                                                     0.0s
 => CANCELED [pycontw python_deps 3/6] RUN apt-get install -y     libpq-dev     gcc     zlib1g-dev     libjpeg62-turbo-dev     mime-support     gettext     l  10.4s
 => CACHED [pycontw node_deps 1/4] COPY ./yarn.lock yarn.lock                                                                                                   0.0s
 => CACHED [pycontw node_deps 2/4] COPY ./package.json package.json                                                                                             0.0s
 => CACHED [pycontw node_deps 3/4] RUN corepack enable                                                                                                          0.0s
 => ERROR [pycontw node_deps 4/4] RUN yarn install --immutable                                                                                                 10.1s
------                                                                                                                                                               
 > [pycontw node_deps 4/4] RUN yarn install --immutable:                                                                                                             
0.657 yarn install v1.22.22                                                                                                                                          
0.709 [1/4] Resolving packages...
0.856 [2/4] Fetching packages...
6.519 [3/4] Linking dependencies...
8.266 [4/4] Building fresh packages...
9.705 error /node_modules/node-sass: Command failed.
9.705 Exit code: 1
9.705 Command: node scripts/build.js
9.705 Arguments: 
9.705 Directory: /node_modules/node-sass
9.705 Output:
9.705 Binary found at /node_modules/node-sass/vendor/linux-arm64-115/binding.node
9.705 Testing binary
9.705 Binary has a problem: Error: /node_modules/node-sass/vendor/linux-arm64-115/binding.node: file too short
9.705     at Module._extensions..node (node:internal/modules/cjs/loader:1473:18)
9.705     at Module.load (node:internal/modules/cjs/loader:1207:32)
9.705     at Module._load (node:internal/modules/cjs/loader:1023:12)
9.705     at Module.require (node:internal/modules/cjs/loader:1235:19)
9.705     at require (node:internal/modules/helpers:176:18)
9.705     at module.exports (/node_modules/node-sass/lib/binding.js:19:10)
9.705     at Object.<anonymous> (/node_modules/node-sass/lib/index.js:13:35)
9.705     at Module._compile (node:internal/modules/cjs/loader:1376:14)
9.705     at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
9.705     at Module.load (node:internal/modules/cjs/loader:1207:32) {
9.705   code: 'ERR_DLOPEN_FAILED'
9.705 }
9.705 Building the binary locally
9.705 Building: /usr/local/bin/node /node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
9.705 gyp info it worked if it ends with ok
9.705 gyp verb cli [
9.705 gyp verb cli   '/usr/local/bin/node',
9.705 gyp verb cli   '/node_modules/node-gyp/bin/node-gyp.js',
9.705 gyp verb cli   'rebuild',
9.705 gyp verb cli   '--verbose',
9.705 gyp verb cli   '--libsass_ext=',
9.705 gyp verb cli   '--libsass_cflags=',
9.705 gyp verb cli   '--libsass_ldflags=',
9.705 gyp verb cli   '--libsass_library='
9.705 gyp verb cli ]
9.705 gyp info using [email protected]
9.705 gyp info using [email protected] | linux | arm64
9.705 gyp verb command rebuild []
9.705 gyp verb command clean []
9.705 gyp verb clean removing "build" directory
9.705 gyp verb command configure []
9.705 gyp verb find Python Python is not set from command line or npm configuration
9.705 gyp verb find Python Python is not set from environment variable PYTHON
9.705 gyp verb find Python checking if "python3" can be used
9.705 gyp verb find Python - executing "python3" to get executable path
9.705 gyp verb find Python - "python3" is not in PATH or produced an error
9.705 gyp verb find Python checking if "python" can be used
9.705 gyp verb find Python - executing "python" to get executable path
9.705 gyp verb find Python - "python" is not in PATH or produced an error
9.705 gyp ERR! find Python 
9.705 gyp ERR! find Python Python is not set from command line or npm configuration
9.705 gyp ERR! find Python Python is not set from environment variable PYTHON
9.705 gyp ERR! find Python checking if "python3" can be used
9.705 gyp ERR! find Python - "python3" is not in PATH or produced an error
9.705 gyp ERR! find Python checking if "python" can be used
9.705 gyp ERR! find Python - "python" is not in PATH or produced an error
9.705 gyp ERR! find Python 
9.705 gyp ERR! find Python **********************************************************
9.705 gyp ERR! find Python You need to install the latest version of Python.
9.705 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
9.705 gyp ERR! find Python you can try one of the following options:
9.705 gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
9.705 gyp ERR! find Python   (accepted by both node-gyp and npm)
9.705 gyp ERR! find Python - Set the environment variable PYTHON
9.705 gyp ERR! find Python - Set the npm configuration variable python:
9.705 gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
9.705 gyp ERR! find Python For more information consult the documentation at:
9.705 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
9.705 gyp ERR! find Python **********************************************************
9.705 gyp ERR! find Python 
9.705 gyp ERR! configure error 
9.705 gyp ERR! stack Error: Could not find any Python installation to use
9.705 gyp ERR! stack     at PythonFinder.fail (/node_modules/node-gyp/lib/find-python.js:330:47)
9.705 gyp ERR! stack     at PythonFinder.runChecks (/node_modules/node-gyp/lib/find-python.js:159:21)
9.705 gyp ERR! stack     at PythonFinder.<anonymous> (/node_modules/node-gyp/lib/find-python.js:202:16)
9.705 gyp ERR! stack     at PythonFinder.execFileCallback (/node_modules/node-gyp/lib/find-python.js:294:16)
9.705 gyp ERR! stack     at exithandler (node:child_process:430:5)
9.705 gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:442:5)
9.705 gyp ERR! stack     at ChildProcess.emit (node:events:518:28)
9.705 gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:292:12)
9.705 gyp ERR! stack     at onErrorNT (node:internal/child_process:484:16)
9.705 gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
9.705 gyp ERR! System Linux 6.6.22-linuxkit
9.705 gyp ERR! command "/usr/local/bin/node" "/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
9.705 gyp ERR! cwd /node_modules/node-sass
9.705 gyp ERR! node -v v20.11.0
9.705 gyp ERR! node-gyp -v v8.4.1
9.705 gyp ERR! not ok 
9.705 Build failed with error code: 1
9.705 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
failed to solve: process "/bin/sh -c yarn install --immutable" did not complete successfully: exit code: 1
@mattwang44 mattwang44 added the triage needed The bug report may be just filed. Please triage it. label Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage needed The bug report may be just filed. Please triage it.
Projects
None yet
Development

No branches or pull requests

1 participant