ovpn-admin
ovpn-admin copied to clipboard
executor failed running command [/bin/sh -c cd /app && npm install && npm run build]
I encounter this problem when installing ovpn-admin using docker-compose. Is this a bug or it's my problem?
reproduce the problem
- change Docker-compose.yml
OVPN_SERVER_NET
to myIP
.
=> => sha256:ffa817ee038111499f92ff6a457ee35f610ca3 14.68MB / 134.80MB 111.0s => => sha256:ca8db909d3e65714b9a210639cc9901cc3263fa34fc0f8 156B / 156B 67.2s => [ovpn-admin:local internal] load build context 0.1s => => transferring context: 1.71MB 0.1s => [ovpn-admin:local frontend-builder 2/3] COPY frontend/ /app 0.1s => ERROR [ovpn-admin:local frontend-builder 3/3] RUN cd /app && npm in 110.5s
[ovpn-admin:local frontend-builder 3/3] RUN cd /app && npm install && npm run build: #0 10.52 npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. #0 13.20 npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 #0 18.57 npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 #0 20.80 npm WARN deprecated [email protected]: this library is no longer supported #0 110.3 npm notice #0 110.3 npm notice New minor version of npm available! 8.1.0 -> 8.10.0 #0 110.3 npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.10.0 #0 110.3 npm notice Run
npm install -g [email protected]
to update! #0 110.3 npm notice #0 110.3 npm ERR! code 1 #0 110.3 npm ERR! path /app/node_modules/node-sass #0 110.3 npm ERR! command failed #0 110.3 npm ERR! command sh -c node scripts/build.js #0 110.3 npm ERR! Building: /usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= #0 110.3 npm ERR! gyp info it worked if it ends with ok #0 110.3 npm ERR! gyp verb cli [ #0 110.3 npm ERR! gyp verb cli '/usr/local/bin/node', #0 110.3 npm ERR! gyp verb cli '/app/node_modules/node-gyp/bin/node-gyp.js', #0 110.3 npm ERR! gyp verb cli 'rebuild', #0 110.3 npm ERR! gyp verb cli '--verbose', #0 110.3 npm ERR! gyp verb cli '--libsass_ext=', #0 110.3 npm ERR! gyp verb cli '--libsass_cflags=', #0 110.3 npm ERR! gyp verb cli '--libsass_ldflags=', #0 110.3 npm ERR! gyp verb cli '--libsass_library=' #0 110.3 npm ERR! gyp verb cli ] #0 110.3 npm ERR! gyp info using [email protected] #0 110.3 npm ERR! gyp info using [email protected] | linux | x64 #0 110.3 npm ERR! gyp verb command rebuild [] #0 110.3 npm ERR! gyp verb command clean [] #0 110.3 npm ERR! gyp verb clean removing "build" directory #0 110.3 npm ERR! gyp verb command configure [] #0 110.3 npm ERR! gyp verb find Python Python is not set from command line or npm configuration #0 110.3 npm ERR! gyp verb find Python Python is not set from environment variable PYTHON #0 110.3 npm ERR! gyp verb find Python checking if "python3" can be used #0 110.3 npm ERR! gyp verb find Python - executing "python3" to get executable path #0 110.3 npm ERR! gyp verb find Python - "python3" is not in PATH or produced an error #0 110.3 npm ERR! gyp verb find Python checking if "python" can be used #0 110.3 npm ERR! gyp verb find Python - executing "python" to get executable path #0 110.3 npm ERR! gyp verb find Python - "python" is not in PATH or produced an error #0 110.3 npm ERR! gyp ERR! find Python #0 110.3 npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration #0 110.3 npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON #0 110.3 npm ERR! gyp ERR! find Python checking if "python3" can be used #0 110.3 npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error #0 110.3 npm ERR! gyp ERR! find Python checking if "python" can be used #0 110.3 npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error #0 110.3 npm ERR! gyp ERR! find Python #0 110.3 npm ERR! gyp ERR! find Python ********************************************************** #0 110.3 npm ERR! gyp ERR! find Python You need to install the latest version of Python. #0 110.3 npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not, #0 110.3 npm ERR! gyp ERR! find Python you can try one of the following options: #0 110.3 npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable" #0 110.3 npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm) #0 110.3 npm ERR! gyp ERR! find Python - Set the environment variable PYTHON #0 110.3 npm ERR! gyp ERR! find Python - Set the npm configuration variable python: #0 110.3 npm ERR! gyp ERR! find Python npm config set python "/path/to/pythonexecutable" #0 110.3 npm ERR! gyp ERR! find Python For more information consult the documentation at: #0 110.3 npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation #0 110.3 npm ERR! gyp ERR! find Python ********************************************************** #0 110.3 npm ERR! gyp ERR! find Python #0 110.3 npm ERR! gyp ERR! configure error #0 110.3 npm ERR! gyp ERR! stack Error: Could not find any Python installation to use #0 110.3 npm ERR! gyp ERR! stack at PythonFinder.fail (/app/node_modules/node-gyp/lib/find-python.js:330:47) #0 110.3 npm ERR! gyp ERR! stack at PythonFinder.runChecks (/app/node_modules/node-gyp/lib/find-python.js:159:21) #0 110.3 npm ERR! gyp ERR! stack at PythonFinder.(/app/node_modules/node-gyp/lib/find-python.js:202:16) #0 110.3 npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (/app/node_modules/node-gyp/lib/find-python.js:294:16) #0 110.3 npm ERR! gyp ERR! stack at exithandler (node:child_process:404:5) #0 110.3 npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:416:5) #0 110.3 npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28) #0 110.3 npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12) #0 110.3 npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:477:16) #0 110.3 npm ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21) #0 110.3 npm ERR! gyp ERR! System Linux 5.4.0-109-generic #0 110.3 npm ERR! gyp ERR! command "/usr/local/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" #0 110.3 npm ERR! gyp ERR! cwd /app/node_modules/node-sass #0 110.3 npm ERR! gyp ERR! node -v v16.13.0 #0 110.3 npm ERR! gyp ERR! node-gyp -v v8.4.1 #0 110.3 npm ERR! gyp ERR! not ok #0 110.3 npm ERR! Build failed with error code: 1 #0 110.3 #0 110.3 npm ERR! A complete log of this run can be found in: #0 110.3 npm ERR! /root/.npm/_logs/2022-05-20T07_50_31_433Z-debug.log
failed to solve: executor failed running [/bin/sh -c cd /app && npm install && npm run build]: exit code: 1
I see these lines in your log file
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
In dockerfile you need this:
FROM node:16.13.0-alpine3.12 AS frontend-builder RUN apk add --update python3 make g++ git && rm -rf /var/cache/apk/*
Any particular reason this isn't added to the repo?
@gvariable do you use docker-desktop on Mac ?
same error with me on ubuntu 22.04
the only change is this:
root@proxy:~/ovpn-admin# git diff
diff --git a/start-with-slave.sh b/start-with-slave.sh
index 683eb67..f5ab199 100755
--- a/start-with-slave.sh
+++ b/start-with-slave.sh
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
./start.sh
-docker-compose -p openvpn-slave -f docker-compose-slave.yaml up -d
+docker compose -p openvpn-slave -f docker-compose-slave.yaml up -d
diff --git a/start.sh b/start.sh
index 7545b53..4715df8 100755
--- a/start.sh
+++ b/start.sh
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
-docker-compose -p openvpn-master up -d --build
+docker compose -p openvpn-master up -d --build
since docker-compose
is deprecated (or so they say) and superseded by docker compose
i have same issue #233