profile
viewpoint

Ask questionsBcrypts npm install fails in docker container with node 10.16.0

Docker file

FROM mhart/alpine-node:10.16.0

WORKDIR /app

COPY ./app/package*.json ./

RUN npm install

COPY ./app ./

CMD [ "npm","run","start" ]

bcrypt@3.0.6 install /app/node_modules/bcrypt node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.6/bcrypt_lib-v3.0.6-node-v64-linux-x64-musl.tar.gz node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.6 and node@10.16.0 (node-v64 ABI, musl) (falling back to source compile with node-gyp) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:484:19) gyp ERR! stack at PythonFinder.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:406:16) gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:16) gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29) gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16 gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5 gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:153:21) gyp ERR! System Linux 4.9.125-linuxkit gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/app/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/app/node_modules/bcrypt/lib/binding" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64" gyp ERR! cwd /app/node_modules/bcrypt gyp ERR! node -v v10.16.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok node-pre-gyp ERR! build error 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=/app/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/app/node_modules/bcrypt/lib/binding --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/app/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) node-pre-gyp ERR! System Linux 4.9.125-linuxkit node-pre-gyp ERR! command "/usr/bin/node" "/app/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /app/node_modules/bcrypt node-pre-gyp ERR! node -v v10.16.0 node-pre-gyp ERR! node-pre-gyp -v v0.12.0 node-pre-gyp ERR! not ok Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/app/node_modules/bcrypt/lib/binding --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1) npm WARN app No description npm WARN app No repository field. npm WARN app No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bcrypt@3.0.6 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@3.0.6 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-07-10T00_03_48_476Z-debug.log

kelektiv/node.bcrypt.js

Answer questions YasharF

Is this still an issue? Can this be marked as resolved?

useful!
source:https://uonfu.com/
Github User Rank List