---
name: bcryptjs vs bcrypt on Replit
description: Only bcryptjs works reliably; native bcrypt has build script issues.
---

Always use `bcryptjs` (pure JS) instead of `bcrypt` (native bindings) in Replit projects. The native `bcrypt` package requires node-gyp build scripts that fail in the Replit sandbox.

**Why:** Attempting to install/use native `bcrypt` causes install or runtime errors in the Replit environment.

**How to apply:** In package.json, always specify `"bcryptjs": "..."` and `import bcrypt from "bcryptjs"`.
