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

Not installing on node:lts-alpine3 #1962

Closed
1 task
ShrikantaMazumder opened this issue Dec 31, 2021 · 1 comment
Closed
1 task

Not installing on node:lts-alpine3 #1962

ShrikantaMazumder opened this issue Dec 31, 2021 · 1 comment

Comments

@ShrikantaMazumder
Copy link

Issue or Feature

Steps to Reproduce

// Here is my docker file.
FROM node:lts-alpine3.12

RUN mkdir /srv/app && chown node:node /srv/app

RUN npm install -g @adonisjs/cli

USER node

WORKDIR /srv/app

COPY --chown=node:node package.json package-lock.json ./

RUN npm install --quiet

# TODO: Can remove once we have some dependencies in package.json.
RUN mkdir -p node_modules

COPY . .

RUN cp .env.example .env

USER root

CMD ["npm","start"]


// here is error

 > [6/9] RUN npm install --quiet:
#10 4.234 npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
#10 5.463 npm WARN deprecated set-value@1.0.0: Critical bug fixed in v3.0.1, please upgrade to the latest version.
#10 6.028 npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
#10 6.233 npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
#10 7.328 npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
#10 8.013 npm WARN deprecated multicodec@1.0.4: This module has been superseded by the multiformats module
#10 8.052 npm WARN deprecated multibase@0.6.1: This module has been superseded by the multiformats module
#10 9.395 npm WARN deprecated kleur@2.0.2: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
#10 10.58 npm WARN deprecated har-validator@5.1.5: this library is no longer supported
#10 11.12 npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
#10 18.02 npm WARN deprecated @sapphire/snowflake@1.3.6: This version has been automatically deprecated by @favware/npm-deprecate. Please use a newer version.
#10 18.97 npm WARN deprecated cids@0.7.5: This module has been superseded by the multiformats module
#10 21.80 npm WARN deprecated uuid@3.4.0: 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.
#10 22.80 npm WARN deprecated multibase@1.0.1: This module has been superseded by the multiformats module
#10 22.89 npm WARN deprecated multibase@1.0.1: This module has been superseded by the multiformats module
#10 23.44 npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
#10 23.53 npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
#10 23.64 npm WARN deprecated uuid@2.0.1: 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.
#10 24.08 npm WARN deprecated uuid@3.3.2: 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.
#10 24.79 npm WARN deprecated discord-api-types@0.18.1: No longer supported. Install the latest release (0.20.2)
#10 29.37 npm WARN deprecated cids@0.8.3: This module has been superseded by the multiformats module
#10 90.53 npm notice 
#10 90.53 npm notice New minor version of npm available! 8.1.2 -> 8.3.0
#10 90.53 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.3.0>
#10 90.53 npm notice Run `npm install -g [email protected]` to update!
#10 90.53 npm notice 
#10 90.53 npm ERR! code 1
#10 90.53 npm ERR! path /srv/app/node_modules/canvas
#10 90.53 npm ERR! command failed
#10 90.53 npm ERR! command sh -c node-pre-gyp install --fallback-to-build
#10 90.53 npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/srv/app/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/srv/app/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
#10 90.53 npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v93-linux-musl-arm64.tar.gz 
#10 90.53 npm ERR! node-pre-gyp WARN Pre-built binaries not installable for canvas@2.8.0 and node@16.13.1 (node-v93 ABI, musl) (falling back to source compile with node-gyp) 
#10 90.53 npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v93-linux-musl-arm64.tar.gz 
#10 90.53 npm ERR! gyp ERR! find Python 
#10 90.53 npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
#10 90.53 npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
#10 90.53 npm ERR! gyp ERR! find Python checking if "python3" can be used
#10 90.53 npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
#10 90.53 npm ERR! gyp ERR! find Python checking if "python" can be used
#10 90.53 npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
#10 90.53 npm ERR! gyp ERR! find Python 
#10 90.53 npm ERR! gyp ERR! find Python **********************************************************
#10 90.53 npm ERR! gyp ERR! find Python You need to install the latest version of Python.
#10 90.53 npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#10 90.53 npm ERR! gyp ERR! find Python you can try one of the following options:
#10 90.53 npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#10 90.53 npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
#10 90.53 npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
#10 90.53 npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
#10 90.53 npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
#10 90.53 npm ERR! gyp ERR! find Python For more information consult the documentation at:
#10 90.53 npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#10 90.53 npm ERR! gyp ERR! find Python **********************************************************
#10 90.53 npm ERR! gyp ERR! find Python 
#10 90.53 npm ERR! gyp ERR! configure error 
#10 90.53 npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
#10 90.53 npm ERR! gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
#10 90.53 npm ERR! gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
#10 90.53 npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
#10 90.53 npm ERR! gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
#10 90.53 npm ERR! gyp ERR! stack     at exithandler (node:child_process:404:5)
#10 90.53 npm ERR! gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:416:5)
#10 90.53 npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
#10 90.53 npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
#10 90.53 npm ERR! gyp ERR! stack     at onErrorNT (node:internal/child_process:477:16)
#10 90.53 npm ERR! gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
#10 90.53 npm ERR! gyp ERR! System Linux 5.10.47-linuxkit
#10 90.53 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/srv/app/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/srv/app/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
#10 90.53 npm ERR! gyp ERR! cwd /srv/app/node_modules/canvas
#10 90.53 npm ERR! gyp ERR! node -v v16.13.1
#10 90.53 npm ERR! gyp ERR! node-gyp -v v8.3.0
#10 90.53 npm ERR! gyp ERR! not ok 
#10 90.53 npm ERR! node-pre-gyp ERR! build error 
#10 90.53 npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/srv/app/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/srv/app/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
#10 90.53 npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/srv/app/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
#10 90.53 npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
#10 90.53 npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
#10 90.53 npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
#10 90.53 npm ERR! node-pre-gyp ERR! System Linux 5.10.47-linuxkit
#10 90.53 npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/srv/app/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
#10 90.53 npm ERR! node-pre-gyp ERR! cwd /srv/app/node_modules/canvas
#10 90.53 npm ERR! node-pre-gyp ERR! node -v v16.13.1
#10 90.53 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.8
#10 90.53 npm ERR! node-pre-gyp ERR! not ok
#10 90.55 
#10 90.55 npm ERR! A complete log of this run can be found in:
#10 90.55 npm ERR!     /home/node/.npm/_logs/2021-12-31T05_17_20_452Z-debug.log
------
executor failed running [/bin/sh -c npm install --quiet]: exit code: 1


@zbjornson
Copy link
Collaborator

Please see the section on Alpine Linux in the troubleshooting guide at the top of the issue template (#1511):

If you're on Alpine Linux or another distro using musl-libc

The log may look like

node-pre-gyp WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.0/canvas-v2.6.0-node-v64-linux-musl-x64.tar.gz

Prebuilds are only available for glibc, not musl-libc. See node-gfx/node-canvas-prebuilt#77, which includes information on building from source.

simonfernandes added a commit to UserOfficeProject/user-office-factory that referenced this issue Jan 26, 2022
Refs #74: Adds dependencies required to build Canvas from source, needed after the pre-built binaries were removed and no longer seem to be supported

Automattic/node-canvas#1962
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants