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

[Docker] npm ERR! notsup Unsupported engine for TimeOff.Management #505

Open
maeries opened this issue Feb 2, 2022 · 2 comments
Open

[Docker] npm ERR! notsup Unsupported engine for TimeOff.Management #505

maeries opened this issue Feb 2, 2022 · 2 comments

Comments

@maeries
Copy link

maeries commented Feb 2, 2022

I'm trying to install timeoff as a Docker container and since I couldn't fine a docker rum command of docker-compose.yml I tried to build the image using the dockerfile. (If that's not the recommended way, let me know)

:~/docker/timeoff$ wget https://raw.githubusercontent.com/timeoff-management/timeoff-management-application/master/Dockerfile
--2022-02-02 17:15:52--  https://raw.githubusercontent.com/timeoff-management/timeoff-management-application/master/Dockerfile
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.111.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1001 [text/plain]
Saving to: 'Dockerfile'

Dockerfile                                   100%[==============================================================================================>]    1001  --.-KB/s    in 0s

2022-02-02 17:15:53 (21.3 MB/s) - 'Dockerfile' saved [1001/1001]
:~/docker/timeoff$ docker build --tag timeoff:latest .
Sending build context to Docker daemon   2.56kB
Step 1/12 : FROM alpine:3.8
 ---> c8bccc0af957
Step 2/12 : EXPOSE 3000
 ---> Using cache
 ---> ef7572fedc71
Step 3/12 : LABEL org.label-schema.schema-version="1.0"
 ---> Using cache
 ---> dace556b1471
Step 4/12 : LABEL org.label-schema.docker.cmd="docker run -d -p 3000:3000 --name alpine_timeoff"
 ---> Using cache
 ---> d4087290d91f
Step 5/12 : RUN apk add --no-cache     git     make     nodejs npm     python     vim
 ---> Using cache
 ---> 4abee143fb6a
Step 6/12 : RUN adduser --system app --home /app
 ---> Using cache
 ---> ed464e350e6b
Step 7/12 : USER app
 ---> Using cache
 ---> de1bac23f407
Step 8/12 : WORKDIR /app
 ---> Using cache
 ---> 0debc55f09df
Step 9/12 : RUN git clone https://github.com/timeoff-management/application.git timeoff-management
 ---> Using cache
 ---> a1611f7ae8fc
Step 10/12 : WORKDIR /app/timeoff-management
 ---> Using cache
 ---> ba514c519533
Step 11/12 : RUN npm install
 ---> Running in 7e17fa55b48d
npm ERR! code ENOTSUP
npm ERR! notsup Unsupported engine for [email protected]: wanted: {"node":">=13.0.0"} (current: {"node":"8.14.0","npm":"6.4.1"})
npm ERR! notsup Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Required: {"node":">=13.0.0"}
npm ERR! notsup Actual:   {"npm":"6.4.1","node":"8.14.0"}

npm ERR! A complete log of this run can be found in:
npm ERR!     /app/.npm/_logs/2022-02-02T16_16_03_872Z-debug.log
The command '/bin/sh -c npm install' returned a non-zero code: 1

Which means it doesn't build an image that I can run

@BeckeBauer
Copy link

Your error code shows

Not compatible with your version of node/npm:
Required: {"node":">=13.0.0"}
Actual:   {"npm":"6.4.1","node":"8.14.0"}

Seems to be a problem with your node version. I am able to run the app dockerised with the following dockerfile content

FROM node:15

EXPOSE 3000

ENV NODE_ENV=production

RUN git clone https://github.com/timeoff-management/timeoff-management-application.git timeoff

WORKDIR /timeoff

RUN npm install

RUN npm install --save mysql

CMD npm start

Tlattice added a commit to Tlattice/timeoff-management-application that referenced this issue Feb 19, 2022
@adocampo
Copy link

My docker build also fails, the error seems different

...
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated [email protected]: Please update to v6 or higher! A migration guide can be found here: https://sequelize.org/v6/manual/upgrade-to-v6.html
npm ERR! code 1
npm ERR! path /node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/node_modules/sqlite3/lib/binding/node-v108-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/node_modules/sqlite3/lib/binding/node-v108-linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108 --python=/usr/bin/python3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download 
npm ERR! node-pre-gyp info check checked for "/node_modules/sqlite3/lib/binding/node-v108-linux-x64/node_sqlite3.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v108-linux-x64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v108-linux-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v108-linux-x64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v108 ABI, musl) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v108-linux-x64.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! find Python checking Python explicitly set from command line or npm configuration
npm ERR! gyp ERR! find Python - "--python=" or "npm config get python" is "/usr/bin/python3"
npm ERR! gyp ERR! find Python - "/usr/bin/python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack     at PythonFinder.fail (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
npm ERR! gyp ERR! stack     at PythonFinder.runChecks (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
npm ERR! gyp ERR! stack     at PythonFinder.execFileCallback (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
npm ERR! gyp ERR! stack     at exithandler (node:child_process:427:5)
npm ERR! gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:439:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:289:12)
npm ERR! gyp ERR! stack     at onErrorNT (node:internal/child_process:476:16)
npm ERR! gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! gyp ERR! System Linux 6.2.10-arch1-1
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/node_modules/sqlite3/lib/binding/node-v108-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/node_modules/sqlite3/lib/binding/node-v108-linux-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108" "--python=/usr/bin/python3"
npm ERR! gyp ERR! cwd /node_modules/sqlite3
npm ERR! gyp ERR! node -v v18.14.2
npm ERR! gyp ERR! node-gyp -v v9.3.0
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/node_modules/sqlite3/lib/binding/node-v108-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/node_modules/sqlite3/lib/binding/node-v108-linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108 --python=/usr/bin/python3' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Linux 6.2.10-arch1-1
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /node_modules/sqlite3
npm ERR! node-pre-gyp ERR! node -v v18.14.2
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok

A docker-compose.yml would be much appretiated, or a docker build instructions.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants