Skip to content

Learn Next.js Chapter 6 setting up your database. Cannot find module bcrypt #76822

Answered by kappy713
mattybj69 asked this question in Help

You must be logged in to vote

Hi, I had the same problem, but I was able to build by switching to bcryptjs as Joseph suggested.

pnpm remove bcrypt
pnpm add bcryptjs

Don't forget to change /app/seed/route.ts to bcryptjs, as it uses bcrypt.

// /app/seed/route.ts
- import bcrypt from "bcrypt";
+ import bcrypt from "bcryptjs";

Replies: 4 comments 20 replies

You must be logged in to vote
2 replies
@mattybj69

@icyJoseph

You must be logged in to vote
18 replies
@flow01-lab

@Dhruv97Sharma

@IsaacDC

@SylvainLeDEV

@jianyun2020

Answer selected by mattybj69

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet