Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Docker 如何修复gyp错误!在npm构建中_Docker_Npm_Node Gyp_Node Pre Gyp - Fatal编程技术网

Docker 如何修复gyp错误!在npm构建中

Docker 如何修复gyp错误!在npm构建中,docker,npm,node-gyp,node-pre-gyp,Docker,Npm,Node Gyp,Node Pre Gyp,我最近构建了一个mean stack应用程序,并将其容器化。然而,我有困难建立在我的覆盆子圆周率和我不理解的错误 当我在我的debian机器上构建我的应用程序时,一切都完美地构建起来。即使我在构建过程中得到这一行: node-pre-gyp WARN Using needle for node-pre-gyp https download 不幸的是,我不能在我的树莓上构建相同的容器。此警告变得更糟,并以错误代码1退出: node-pre-gyp WARN Using needle for no

我最近构建了一个mean stack应用程序,并将其容器化。然而,我有困难建立在我的覆盆子圆周率和我不理解的错误

当我在我的debian机器上构建我的应用程序时,一切都完美地构建起来。即使我在构建过程中得到这一行:

node-pre-gyp WARN Using needle for node-pre-gyp https download
不幸的是,我不能在我的树莓上构建相同的容器。此警告变得更糟,并以错误代码1退出:

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.bcryp                                                                                                                                                             t.js/releases/download/v4.0.1/bcrypt_lib-v4.0.1-napi-v3-linux-arm-musl.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt@4.0.1 and node@13.1.0                                                                                                                                                              (node-v79 ABI, musl) (falling back to source compile with node-gyp)
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_mo                                                                                                                                                             dules/node-gyp/lib/find-python.js:307:47)
gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/no                                                                                                                                                             de_modules/node-gyp/lib/find-python.js:136:21)
gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/                                                                                                                                                             node_modules/node-gyp/lib/find-python.js:179:16)
gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules                                                                                                                                                             /npm/node_modules/node-gyp/lib/find-python.js:271:16)
gyp ERR! stack     at exithandler (child_process.js:302:5)
gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:314:5)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_proces                                                                                                                                                             s.js:270:12)
gyp ERR! stack     at onErrorNT (internal/child_process.js:456:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js                                                                                                                                                             :80:21)
gyp ERR! System Linux 4.19.97-v7l+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_mod                                                                                                                                                             ules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/app/                                                                                                                                                             node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" "--module_name=bcrypt_l                                                                                                                                                             ib" "--module_path=/app/node_modules/bcrypt/lib/binding/napi-v3" "--napi_version                                                                                                                                                             =5" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd /app/node_modules/bcrypt
gyp ERR! node -v v13.1.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
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=/app/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node                                                                                                                                                              --module_name=bcrypt_lib --module_path=/app/node_modules/bcrypt/lib/binding/napi                                                                                                                                                             -v3 --napi_version=5 --node_abi_napi=napi --napi_build_version=3 --node_napi_lab                                                                                                                                                             el=napi-v3' (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:210:5)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1028:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/chi                                                                                                                                                             ld_process.js:283:5)
node-pre-gyp ERR! System Linux 4.19.97-v7l+
node-pre-gyp ERR! command "/usr/local/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 v13.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modu                                                                                                                                                             les/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_mo                                                                                                                                                             dules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node --module_name=bcrypt_lib --modu                                                                                                                                                             le_path=/app/node_modules/bcrypt/lib/binding/napi-v3 --napi_version=5 --node_abi                                                                                                                                                             _napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm WARN clockmachine-api@1.0.0 No repository field.

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

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-05-26T14_29_34_636Z-debug.log
ERROR: Service 'backend' failed to build: The command '/bin/sh -c npm install' returned a non-zero code: 1
node pre gyp警告使用针进行node pre gyp https下载
尝试下载节点前gyp警告(404):https://github.com/kelektiv/node.bcryp                                                                                                                                                             t、 js/releases/download/v4.0.1/bcrypt_lib-v4.0.1-napi-v3-linux-arm-musl.tar.gz
未找到的节点pre-gyp WARN预构建二进制文件bcrypt@4.0.1及node@13.1.0(node-v79 ABI,musl)(使用node-gyp返回到源代码编译)
哎呀!查找Python
哎呀!查找Python未从命令行或npm配置中设置Python
哎呀!未从环境变量Python设置“查找Python”
哎呀!查找Python检查是否可以使用“Python”
哎呀!查找Python-“Python”不在路径中或产生错误
哎呀!查找Python检查是否可以使用“python2”
哎呀!查找Python-“python2”不在路径中或产生错误
哎呀!查找Python检查是否可以使用“python3”
哎呀!查找Python-“python3”不在路径中或产生错误
哎呀!查找Python
哎呀!查找Python**********************************************************
哎呀!查找Python您需要安装最新版本的Python。
哎呀!查找Python节点gyp应该能够找到并使用Python。如果没有,,
哎呀!查找Python您可以尝试以下选项之一:
哎呀!查找Python-使用开关--Python=“/path/to/pythonexecutable”
哎呀!查找Python(节点gyp和npm都接受)
哎呀!find Python-设置环境变量Python
哎呀!查找Python-设置npm配置变量Python:
哎呀!查找Python npm配置集Python“/path/to/pythonexecutable”
哎呀!查找Python有关更多信息,请参阅以下文档:
哎呀!查找Pythonhttps://github.com/nodejs/node-gyp#installation
哎呀!查找Python**********************************************************
哎呀!查找Python
哎呀!配置错误
哎呀!堆栈错误:找不到任何要使用的Python安装
哎呀!PythonFinder.fail处的堆栈(/usr/local/lib/node_modules/npm/node_mo modules/node gyp/lib/find python.js:307:47)
哎呀!PythonFinder.runChecks(/usr/local/lib/node_modules/npm/no de_modules/node gyp/lib/find python.js:136:21)上的堆栈
哎呀!堆叠在PythonFinder。(/usr/local/lib/node_modules/npm/node_modules/node gyp/lib/find python.js:179:16)
哎呀!在PythonFinder.execFileCallback(/usr/local/lib/node_modules/npm/node_modules/node gyp/lib/find python.js:271:16)处堆栈
哎呀!exithandler处的堆栈(child_process.js:302:5)
哎呀!ChildProcess.errorhandler处的堆栈(child_process.js:314:5)
哎呀!ChildProcess.emit上的堆栈(events.js:210:5)
哎呀!堆栈在Process.ChildProcess.\u handle.onexit(内部/child\u进程s.js:270:12)
哎呀!在onErrorNT处堆叠(内部/子进程js:456:16)
哎呀!在processTicksAndRejections(internal/process/task_queues.js:80:21)上堆叠
哎呀!Linux系统4.19.97-v7l+
哎呀!命令“/usr/local/bin/node”“/usr/local/lib/node_modules/npm/node_modules/node gyp/bin/node gyp.js”“配置”“--回退到构建”“--module=/app/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node”--module_name=bcrypt_l ib“”--module_path=/app/node_modules/bcrypt/lib/binding/napi-v3“”--napi_版本=5”“--节点_abi_napi=napi”“--napi_构建_版本=3”“--节点_napi_标签=napi-v3”
gyp ERR!cwd/app/node_modules/bcrypt
GypErr!节点-v13.1.0
gyp ERR!节点gyp-v5.0.5
哎呀!不行
节点预gyp错误!生成错误
节点前gyp错误!堆栈错误:未能执行“/usr/local/bin/node/usr/local/lib/node_modules/npm/no”