• /
  • Question & Réponse
  • /
  • I'm working on an api project with node.js and receive this error while trying to hash my code with bcrypt package

I'm working on an api project with node.js and receive this error while trying to hash my code with bcrypt package

  • Nodejs, Bcrypt
  • Développement Back-end

[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
internal/modules/cjs/loader.js:984
  throw err;
  ^

Error: Cannot find module 'C:\Docs\projetsnine\apiBO\node_modules\bcrypt\lib\binding\bcrypt_lib.node'
Require stack:
- C:\Docs\projetsnine\apiBO\node_modules\bcrypt\bcrypt.js
- C:\Docs\projetsnine\apiBO\lkoir485Joer\connexions\loginer.js
- C:\Docs\projetsnine\apiBO\app.js
- C:\Docs\projetsnine\apiBO\index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:981:15)
    at Function.Module._load (internal/modules/cjs/loader.js:863:27)
    at Module.require (internal/modules/cjs/loader.js:1043:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object. (C:\Docs\projetsnine\apiBO\node_modules\bcrypt\bcrypt.js:6:16)
    at Module._compile (internal/modules/cjs/loader.js:1157:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
    at Module.load (internal/modules/cjs/loader.js:1001:32)
    at Function.Module._load (internal/modules/cjs/loader.js:900:14)
    at Module.require (internal/modules/cjs/loader.js:1043:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Docs\\projetsnine\\apiBO\\node_modules\\bcrypt\\bcrypt.js',
    'C:\\Docs\\projetsnine\\apiBO\\loginer.js',
    'C:\\Docs\\projetsnine\\apiBO\\app.js',
    'C:\\Docs\\projetsnine\\apiBO\\index.js'
  ]
}
[nodemon] app crashed - waiting for file changes before starting...
                    
Solution
  • Node.js
  • Développement back-end
  • Javascript, Jquery
  • Développement front-end
  • Javascript
  • Développement front-end
  • Javascript
  • Développement front-end
  • Javascript
  • Développement front-end
  • PHP
  • Développement back-end