node.js - node_modules/bcrypt/node_modules/bindings/bindings.js :83

标签 node.js module sails.js bcrypt

我遇到了这个问题..有人有想法..那是什么意思.?想在我的本地机器上启动我的应用程序。但医生的工作方式。我在这里用模块或注释和 bcrypt 卡住?有人有解决这个问题的想法吗?为什么会出现这个问题。?

Space-Odysseys-Mac-Pro:www cyberspace$ sails lift

info: Starting app...

/Users/cyberspace/Desktop/www/node_modules/bcrypt/node_modules/bindings/bindings.js:83
        throw e
              ^
Error: dlopen(/Users/cyberspace/Desktop/www/node_modules/bcrypt/build/Release/bcrypt_lib.node, 1): no suitable image found.  Did find:
    /Users/cyberspace/Desktop/www/node_modules/bcrypt/build/Release/bcrypt_lib.node: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at bindings (/Users/cyberspace/Desktop/www/node_modules/bcrypt/node_modules/bindings/bindings.js:76:44)
    at Object. (/Users/cyberspace/Desktop/www/node_modules/bcrypt/bcrypt.js:3:35)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object. (/Users/cyberspace/Desktop/www/config/passport.js:5:10)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
Space-Odysseys-Mac-Pro:www cyberspace$ 

这是我在 Mac OS 上的终端中的命令行工具。 - 当有人有提示或以这种方式解决和解决此问题时,我很高兴。

最佳答案

0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03 表示 Linux 共享库。

您需要在本地重新安装您的依赖项 (npm install)(您可以先完全删除您的 node_modules 以确保没有残留)机器,以便为正确的平台编译 bcrypt

关于node.js - node_modules/bcrypt/node_modules/bindings/bindings.js :83,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32366903/

相关文章:

node.js - Sails JS Passport session 持久性问题 : Mocha Test Failing

node.js - Etherpad:连接身份验证的最佳方式

node.js - Nodejs 和 Express 错误

node.js - Node/Express Handlebars - 在哪里定义自定义助手

node.js - 如何在node.js中使用mailgun接收电子邮件

node.js - typescript node.js 快速路由分隔文件最佳实践

ruby-on-rails-3 - Rails - 将模块包含到 Controller 中,在 View 中使用

python - 使用多个 C 模块编写 Python 包

node.js - 如何测试 stub 数据库查询

javascript - Sails.js - 使用正则表达式的 sails 路线