You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When performing a production build of the OHIF Viewer inside the included Docker container while running on an ARM_64 (aarch64v8) processor, Yarn eventually fails with the following error:
151.9 verbose 109.656568006 Error: /usr/src/app/node_modules/@parcel/watcher: Command failed.
151.9 Exit code: 1
151.9 Command: node-gyp-build
151.9 Arguments:
151.9 Directory: /usr/src/app/node_modules/@parcel/watcher
151.9 Output:
151.9 /usr/src/app/node_modules/node-gyp-build/node-gyp-build.js:60
151.9 throw new Error('No native build was found for ' + target + '\n loaded from: ' + dir + '\n')
151.9 ^
151.9
151.9 Error: No native build was found for platform=linux arch=arm64 runtime=node abi=93 uv=1 armv=8 libc=glibc node=16.15.0
151.9 loaded from: /usr/src/app/node_modules/@parcel/watcher
151.9
151.9 at Function.load.resolve.load.path (/usr/src/app/node_modules/node-gyp-build/node-gyp-build.js:60:9)
151.9 at load (/usr/src/app/node_modules/node-gyp-build/node-gyp-build.js:22:30)
151.9 at Object.<anonymous> (/usr/src/app/node_modules/node-gyp-build/build-test.js:19:19)
151.9 at Module._compile (node:internal/modules/cjs/loader:1105:14)
151.9 at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
151.9 at Module.load (node:internal/modules/cjs/loader:981:32)
151.9 at Function.Module._load (node:internal/modules/cjs/loader:822:12)
151.9 at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
151.9 at node:internal/main/run_main_module:17:47
151.9
151.9 gyp info it worked if it ends with ok
151.9 gyp info using [email protected]
151.9 gyp info using [email protected] | linux | arm64
151.9 gyp ERR! find Python
151.9 gyp ERR! find Python Python is not set from command line or npm configuration
151.9 gyp ERR! find Python Python is not set from environment variable PYTHON
151.9 gyp ERR! find Python checking if "python3" can be used
151.9 gyp ERR! find Python - "python3" is not in PATH or produced an error
151.9 gyp ERR! find Python checking if "python" can be used
151.9 gyp ERR! find Python - "python" is not in PATH or produced an error
151.9 gyp ERR! find Python
151.9 gyp ERR! find Python **********************************************************
151.9 gyp ERR! find Python You need to install the latest version of Python.
151.9 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
151.9 gyp ERR! find Python you can try one of the following options:
151.9 gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
151.9 gyp ERR! find Python (accepted by both node-gyp and npm)
151.9 gyp ERR! find Python - Set the environment variable PYTHON
151.9 gyp ERR! find Python - Set the npm configuration variable python:
151.9 gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
151.9 gyp ERR! find Python For more information consult the documentation at:
151.9 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
151.9 gyp ERR! find Python **********************************************************
151.9 gyp ERR! find Python
151.9 gyp ERR! configure error
151.9 gyp ERR! stack Error: Could not find any Python installation to use
151.9 gyp ERR! stack at PythonFinder.fail (/usr/src/app/node_modules/node-gyp/lib/find-python.js:330:47)
151.9 gyp ERR! stack at PythonFinder.runChecks (/usr/src/app/node_modules/node-gyp/lib/find-python.js:159:21)
151.9 gyp ERR! stack at PythonFinder.<anonymous> (/usr/src/app/node_modules/node-gyp/lib/find-python.js:202:16)
151.9 gyp ERR! stack at PythonFinder.execFileCallback (/usr/src/app/node_modules/node-gyp/lib/find-python.js:294:16)
151.9 gyp ERR! stack at exithandler (node:child_process:406:5)
151.9 gyp ERR! stack at ChildProcess.errorhandler (node:child_process:418:5)
151.9 gyp ERR! stack at ChildProcess.emit (node:events:527:28)
151.9 gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
151.9 gyp ERR! stack at onErrorNT (node:internal/child_process:478:16)
151.9 gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
151.9 gyp ERR! System Linux 6.2.0-26-generic
151.9 gyp ERR! command "/usr/local/bin/node" "/usr/src/app/node_modules/.bin/node-gyp" "rebuild"
151.9 gyp ERR! cwd /usr/src/app/node_modules/@parcel/watcher
151.9 gyp ERR! node -v v16.15.0
151.9 gyp ERR! node-gyp -v v9.4.0
151.9 gyp ERR! not ok
151.9 at ProcessTermError.ExtendableBuiltin (/opt/yarn-v1.22.18/lib/cli.js:721:66)
151.9 at ProcessTermError.MessageError (/opt/yarn-v1.22.18/lib/cli.js:750:123)
151.9 at new ProcessTermError (/opt/yarn-v1.22.18/lib/cli.js:790:113)
151.9 at ChildProcess.<anonymous> (/opt/yarn-v1.22.18/lib/cli.js:25783:17)
151.9 at ChildProcess.emit (node:events:527:28)
151.9 at maybeClose (node:internal/child_process:1092:16)
151.9 at Socket.<anonymous> (node:internal/child_process:451:11)
151.9 at Socket.emit (node:events:527:28)
151.9 at Pipe.<anonymous> (node:net:709:12)
151.9 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
151.9 verbose 109.708245825
151.9 verbose 109.708635426 husky > Setting up git hooks
151.9 spawnSync git ENOENT
151.9 husky > Failed to install
I believe this is due to the fact that @parcel/watcher is a native C++ module which has to be built for the architecture it's running on. Yarn detects this discrepancy and triggers node-gyp to recompile @parcel/watcher. node-gyp fails, however, because it depends on Python v3.7+, make, and GCC. These dependencies are not included in the node:16.15.0-slim Docker image used to build the Viewer.
Steps to Reproduce
Be running an ARM_64 (aarch64v8) machine with git and docker installed.
Describe the Bug
When performing a production build of the OHIF Viewer inside the included Docker container while running on an ARM_64 (aarch64v8) processor, Yarn eventually fails with the following error:
I believe this is due to the fact that
@parcel/watcher
is a native C++ module which has to be built for the architecture it's running on. Yarn detects this discrepancy and triggersnode-gyp
to recompile@parcel/watcher
.node-gyp
fails, however, because it depends onPython v3.7+
,make
, andGCC
. These dependencies are not included in thenode:16.15.0-slim
Docker image used to build the Viewer.Steps to Reproduce
git
anddocker
installed.git clone --recursive https://github.com/OHIF/Viewers.git
cd Viewers
sudo docker build . -t ohif-viewer-image
The current behavior
The build of the Docker image fails.
The expected behavior
The build finishes successfully, producing a local Docker image.
OS
Ubuntu Linux 22.04.3 LTS
Node version
node:16.15.0-slim (Docker image)
Browser
Any
The text was updated successfully, but these errors were encountered: