Skip to content

chapter6 vercel deploy error #1023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
decadezzz opened this issue Mar 10, 2025 · 7 comments
Open

chapter6 vercel deploy error #1023

decadezzz opened this issue Mar 10, 2025 · 7 comments

Comments

@decadezzz
Copy link

Image

@bevane
Copy link

bevane commented Mar 11, 2025

if you try running pnpm build on your local project, you should get a warning like:

Ignored build scripts: bcrypt.                                                           │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts. 

As the warning suggests, run pnpm approve-builds and select bcrypt. Afterwards your package.json should be updated. Commit the new changes and push it to your Github and then try clicking deploy again on Vercel.

@BenjamRuiz
Copy link

if you try running pnpm build on your local project, you should get a warning like:

Ignored build scripts: bcrypt.                                                           │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts. 

As the warning suggests, run pnpm approve-builds and select bcrypt. Afterwards your package.json should be updated. Commit the new changes and push it to your Github and then try clicking deploy again on Vercel.

This is supposed to work, but if it doesn't, you can try the other solution proposed in pnpm/pnpm#9042 (comment)
The proposed solution is to manually add this option into your package.json file:
"pnpm": { "onlyBuiltDependencies": [ "bcrypt" ] }

@decadezzz
Copy link
Author

I solve it by using ’ import from "bcryptjs" ‘ replace ’ import from "bcrypt" ‘

@panditvijay
Copy link

bcryptjs

Which file you made the change?

@decadezzz
Copy link
Author

bcryptjs

Which file you made the change?

you can search which file include import "bcrypt"

@shihabhq
Copy link

I had the same issue. I imported bcryptjs and removed bcrypt.
This worked for me.

in the terminal write this

pnpm remove bcrypt
pnpm add bcryptjs

@tbutman
Copy link

tbutman commented Mar 23, 2025

if you try running pnpm build on your local project, you should get a warning like:

Ignored build scripts: bcrypt.                                                           │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts. 

As the warning suggests, run pnpm approve-builds and select bcrypt. Afterwards your package.json should be updated. Commit the new changes and push it to your Github and then try clicking deploy again on Vercel.

i didn't get any warning like this when trying to build locally but your solution did indeed work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants