Skip to content
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

Vercel login #1025

Open
carletex opened this issue Jan 5, 2025 · 5 comments · May be fixed by #1027
Open

Vercel login #1025

carletex opened this issue Jan 5, 2025 · 5 comments · May be fixed by #1027

Comments

@carletex
Copy link
Member

carletex commented Jan 5, 2025

I tried to deploy to Vercel from the cli in my new computer:

I got this (which is expected (and stated in the docs)
1

But then how do I login?
2

With the current commands (in package.json) doesn't seem possible. If I install Vercel cli globally, then it works after login.

Should we add yarn vercel:login? Or am I missing something?

@damianmarti damianmarti linked a pull request Jan 6, 2025 that will close this issue
@damianmarti
Copy link
Member

That makes sense. Something changed in Vercel. In previous versions, Vercel asked for a login when doing a deployment.

I tried logging out locally and I got the same error message.

I opened a PR to add this #1027

I can add this information to the SE-2 deployment doc page https://docs.scaffoldeth.io/deploying/deploy-nextjs-app

We should update the deployment section from the SpeedRunEthereum challenges too.

@carletex
Copy link
Member Author

carletex commented Jan 6, 2025

Thanks @damianmarti !

Let's also see what @technophile-04 & @rin-st think

@rin-st
Copy link
Member

rin-st commented Jan 6, 2025

tldr: I don't see the way to do it better than @damianmarti made for now


It would be great if we could use any vercel cli command without adding new script to package.json, so for example if I want to use vercel help I don't need to add vercel:help script. But since we already have vercel script, I see two options to do that, and both are bad:

  1. Add "vercel:cli": "vercel" to package.json. So it will be possible to use any vercel cli command with yarn vercel:cli, for example yarn vercel:cli login. It's a ugly, and for using it we need explicitly add it to some very visible place at the docs
  2. Move current vercel and vercel:yolo scripts to vercel:deploy and vercel:deploy-yolo, and change vercel script just to "vercel": "vercel". In that case just yarn vercel login will work, but we will need to change every guide/docs to use yarn vercel:deploy instead of yarn vercel

So, looks like since login is necessary for us, it's easier just to add vercel:login script.

If to chose between (1) and (2) I don't know what is better, probably (2)

@technophile-04
Copy link
Collaborator

technophile-04 commented Jan 7, 2025

I was thinking same option as Rinat suggested (the 2nd one). I think its more future proof. Also the new commands would look more verbose as well.

The advantages of that approach:

  1. In future vercel:deploy or any vercel command error's out the vercel CLI gives suggestion like vercel ... . And people would be able to follow that suggestion directly. Instead of going to package.json and seeing if we have script for that or not like for eg vercel:login.
  2. will allow us to add --prod flag default in vercel:deploy and in yolo. If advance users wants to deploy to preview then directly can directly access vercel CLI
  3. more verbose than current command (it says we are deploying)

And also even if we go with yarn vercel:login will still be needing to update docs nd other README's as well right? Hinting users to run yarn vercel:login if they get that error?

So maybe we make that script command breaking changes now itself? Because maybe in future we might need to do this.


Lol yeah removing yarn verce:yolo will be hard emotionally, I tried appending vercel login && vercel ... but with that approach vercel displays login option again in CLI

@carletex
Copy link
Member Author

carletex commented Jan 7, 2025

Thank you guys! I don't see any option as the clear winner, all have pros/cons. Let's sleep on it and discuss it tomorrow.

Question: would it be possible to do some inline conditional magic in the package.json script? Like: if yarn vercel deploy as usual, or else if yarn vercel <command> (except flags? --flag?) run the official vercel cli. Maybe is too messy, just thinking out loud!

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

Successfully merging a pull request may close this issue.

4 participants