Error: /home/george/Desktop/myProject/node_modules/bcrypt/build/Release/bcrypt_lib.node: undefined symbol: node_module_register
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 bin
Error: dlopen(/Users//Documents/Work/Repo/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node, 0x0001): tried: '/Users//Documents/Work/Repo/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64)))
at Ob
-----------------------------------STDERR-----------------------------------
The command '/bin/sh -c cd /built_app/programs/server && npm install --unsafe-perm' returned a non-zero code: 1
-----------------------------------STDOUT-----------------------------------
rget/bcrypt_l
我正在处理一个Node.js /解析服务器项目(在Heroku上),在这个项目中我似乎从一开始就遇到了一些问题。有没有人能让我知道他们看到了什么错误?
这是package.json文件:
{
"name": "parse-server-example",
"version": "1.4.0",
"description": "An example Parse API server using the parse-server module",
"main": "ind
bcrypt似乎与节点不匹配。
我的节点版本是4.2.1
Error: Module version mismatch. Expected 46, got 14.
at Error (native)
at Object.Module._extensions..node (module.js:460:18)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at requ
我想在用户登录时检查密码,但出现错误消息"TypeError: bcrypt.checkPassword is not a function“。
下面是我的代码,我不明白为什么bcrypt.checkPassword不是一个函数。
bcrypt.js
var checkPassword = function(textEnteredInLoginForm, hashedPasswordFromDatabase) {
return new Promise(function(resolve, reject) {
bcrypt.compare(textEnteredInLoginF
因此,我尝试再次运行我的均值堆栈应用程序,当我进入节点server.js时,我得到错误:
/Users/<myusername>/Desktop/Wardrobe_fairy (Update)/api/node_modules/bcrypt/node_modules/bindings/bindings.js:83
throw e
^
Error: Module did not self-register.
at Error (native)
at Object.Module._extensions..node (module.js:
我尝试下载解析服务器源代码()并进行构建,但是得到了这个错误。
运行命令$ npm install
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
> bcrypt@0.8.7 install /Users/dora/parse-server/node_modules/bcrypt
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is dep
是否有一种优雅的方法将bcrypt哈希值返回到单独的模块?
在下面的示例中,函数hashPassword()使用bcrypt对密码进行散列。它位于hashpassword.js文件中。我想将它的散列值返回给app.js中的变量app.js。我相信一定有一种蛮力的方法来做到这一点。但是,有什么聪明或优雅的方式来返回价值吗?
app.js
let password = '123';
let myHashedPassword = hashPassword(password);
hashpassword.js
function hashPassword(password) {
由于某种原因,bcrypt.hash方法挂起,从不调用它的回调。
bcrypt.genSalt(29, function(err, salt) {
if (err) {
res.json({ success: false, msg: err.message });
} else {
bcrypt.hash(req.body.password, salt, function (err, hash) {
// This function is never called
res.json({ succes
我已经从Node.js 0.12.7升级到4.2.1,在启动服务器时出现了以下错误:
$ node server.js
C:\Users\me\documents\github\angular-express-auth\node_modules\bcrypt\node_modules\bindings\bindings.js:83
throw e
^
Error: The specified procedure could not be found.
\\?\C:\Users\me\documents\github\angular-express-auth\n
var mongoose = require('mongoose');
var bcrypt = require('bcrypt-nodejs');
var Schema = mongoose.Schema;
var UserSchema = new Schema({
username:{type: String,lowercase: true, required: true,unique:true},
password:{type:String, required:true},
email:{type:String,require
当我试图通过命令"sudo安装bcrypt --保存“在Ubuntu18.04中安装bcrypt时,我得到了一个错误:
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for bcrypt@3.0.6 and node@10.16.3 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WA