socketio / socket.io-website

Socket.IO website and blog
https://socket.io
319 stars 696 forks source link

Require `bcryptjs` instead of `bcrypt` #363

Closed gustavothecoder closed 1 year ago

gustavothecoder commented 1 year ago

Looks like that the module name is bcryptjs:

> require("bcrypt").hashSync("changeit", 10)
Uncaught Error: Cannot find module 'bcrypt'
Require stack:
- <repl>
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '<repl>' ]
}
> require("bcryptjs").hashSync("changeit", 10)
'$2a$10$t9LpTAKdKJvGsVXqNsHF5eOKkAVsGvZsDR0r2aCdNXRy1n007QM7q'
>
vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
socket-io-website ✅ Ready (Inspect) Visit Preview Jan 4, 2023 at 10:59PM (UTC)
darrachequesne commented 1 year ago

@gustavothecoder thanks!