gpt4 book ai didi

node.js - bcrypt安装成功后失败

转载 作者:太空宇宙 更新时间:2023-11-04 02:35:54 25 4
gpt4 key购买 nike

我在 OpenShift 平台上部署应用程序时遇到问题。
看起来 bcrypt 失败了,但一切似乎都安装正确。
恐怕我想使用的每个 Node 模块都会遇到同样的问题。
我想可能是,问题出在 Node 模块的版本上。

我还是不知道。我希望有人能帮助我了解发生了什么事。
我复制了整个 jenkins 控制台输出(请注意,在 OpenShift 服务器上第一次 git Push 后,我得到了完全相同的输出)。

Started by user Jenkins Admin Building remotely on nodejsbldr in workspace /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo Checkout:repo / /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo - hudson.remoting.Channel@129c587:nodejsbldr Using strategy: Default Checkout:repo / /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo - hudson.remoting.LocalChannel@d1cdcd Wiping out workspace first. Cloning the remote Git repository Cloning repository origin Fetching upstream changes from ssh://mySshPrivateId@nodejs-caty.rhcloud.com/~/git/nodejs.git Seen branch in repository origin/HEAD Seen branch in repository origin/alpha Seen branch in repository origin/master Commencing build of Revision 26cbed22880b5ac3b5bab4b016dbc5fe75579792 (origin/alpha) Checking out Revision 26cbed22880b5ac3b5bab4b016dbc5fe75579792 (origin/alpha) No change to record in branch origin/alpha [repo] $ /bin/sh -xe /tmp/hudson154161094843280943.sh
+ source /usr/lib/openshift/cartridge_sdk/bash/sdk
++ '[' false == true ']'
++ OO_BASH_SDK=true
+ alias 'rsync=rsync --delete-after -az -e '\''/usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh'\'''
+ upstream_ssh=mySshPrivateId@nodejs-caty.rhcloud.com
+ rm -f /var/lib/openshift/myPrivateWorkSpace//app-deployments/current/metadata.json
+ marker_present force_clean_build
+ '[' -f /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo//.openshift/markers/force_clean_build ']'
+ set +e
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh 'mySshPrivateId@nodejs-caty.rhcloud.com:$OPENSHIFT_BUILD_DEPENDENCIES_DIR' /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/build-dependencies/
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh 'mySshPrivateId@nodejs-caty.rhcloud.com:$OPENSHIFT_DEPENDENCIES_DIR' /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/dependencies/
+ set -e
+ gear build Building git ref 'origin/alpha', commit 26cbed2 Building NodeJS cartridge npm info it worked if it ends with ok npm info using npm@1.2.17 npm info using node@v0.10.5 npm info preinstall Caty@0.0.1a npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo npm info linkStuff Caty@0.0.1a npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/node_modules/csrf npm info preinstall csrf@0.0.3 npm info linkStuff csrf@0.0.3 npm info install csrf@0.0.3 npm info postinstall csrf@0.0.3 npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/node_modules/session-mongoose npm info preinstall session-mongoose@0.4.1 npm info linkStuff session-mongoose@0.4.1 npm info install session-mongoose@0.4.1 npm info postinstall session-mongoose@0.4.1 npm info install Caty@0.0.1a npm info postinstall Caty@0.0.1a npm info prepublish Caty@0.0.1a npm info ok
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh mySshPrivateId@nodejs-caty.rhcloud.com 'gear stop --conditional
--exclude-web-proxy --git-ref gtiRefNum' Stopping gear... Stopping MongoDB cartridge Stopping NodeJS cartridge
++ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh mySshPrivateId@nodejs-caty.rhcloud.com 'gear create-deployment-dir'
+ deployment_dir=2014-03-12_22-42-14.111
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/myPrivateWorkSpace//app-deployments/current/metadata.json mySshPrivateId@nodejs-caty.rhcloud.com:app-deployments/2014-03-12_22-42-14.111/metadata.json
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh
--exclude .git /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/ mySshPrivateId@nodejs-caty.rhcloud.com:app-root/runtime/repo/
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/build-dependencies/ mySshPrivateId@nodejs-caty.rhcloud.com:app-root/runtime/build-dependencies/
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/dependencies/ mySshPrivateId@nodejs-caty.rhcloud.com:app-root/runtime/dependencies/
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh mySshPrivateId@nodejs-caty.rhcloud.com 'gear remotedeploy
--deployment-datetime 2014-03-12_22-42-14.111' Preparing build for deployment Deployment id is aa14cca3 Activating deployment Starting MongoDB cartridge Starting NodeJS cartridge

DEBUG: Running node-supervisor with DEBUG: program 'app.js' DEBUG:
--watch '.' DEBUG: --ignore 'undefined' DEBUG: --extensions 'node|js|coffee' DEBUG: --exec 'node'

DEBUG: Starting child process with 'node app.js' DEBUG: Watching directory '/var/lib/openshift/mySshPrivateId/app-root/runtime/repo' for changes. Failed to load c++ bson extension, using pure JS version

/var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/node_modules/bindings/bindings.js:79
throw e
^ Error: /var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/build/Release/bcrypt_lib.node: invalid ELF header
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at bindings (/var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
at Object.<anonymous> (/var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/bcrypt.js:1:97)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12) DEBUG: Program node app.js exited with code 8

DEBUG: Starting child process with 'node app.js' Archiving artifacts Finished: SUCCESS

有关版本的提取引用:

using npm@1.2.17 npm info using node@v0.10.5

以及我的应用程序依赖项列表:

"dependencies": {
"express": "3.4.8",
"jade": "1.1.5",
"socket.io": "0.9.16",
"bcrypt": "0.7.7",
"colors": "0.6.2",
"connect": "2.13.0",
"connect-mongo": "0.4.0",
"cookie": "0.1.1",
"mongodb": "1.3.23",
"mongoose": "3.8.6"
},

提前感谢任何有勇气冒险提供这堆信息的人。 :)

最佳答案

我也遇到了同样的问题,我怀疑因为我在 Mac 上工作,所以它与 here 中描述的 OSX bcrypt 编译问题有关。 .
我尝试删除 node_modules 目录并让 OpenShift 运行 npm 并再次下载依赖项,但由于某种原因这对我不起作用。

我最终创建了一个新应用程序并提交了我的存储库,同时排除了解决我的问题的 node_module 文件夹。

关于node.js - bcrypt安装成功后失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22383014/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com