Vercel redeploy [project name] lead to "can't find deployment"

vercel redeploy [project name] says:
Error: Can’t find the deployment “project name” under the context “my-projects”

It should start a redeploy

I’ve started this project using the name projectname.ai, but changed it. That lead to not being able to do a “vercel redeploy”.

What should I do now? Do I really need to remove the whole project leading to massive downtime or can you help me Vercel?

Hi, and welcome to the Vercel Community @josefnorlin!

You shouldn’t need to remove the entire project, which would indeed cause downtime.

Some things to try:

  1. Make sure you’re using the correct, current project name when running the redeploy command. If you’ve changed the name, use the new name.
vercel redeploy [new-project-name]
  1. Use the following command to list all your projects and verify the correct name:
vercel ls
  1. Link Your Project:
    If the project is not properly linked, you can try re-linking it:
vercel link
  1. Try removing the .vercel directory in your project folder and then run vercel again to re-initialize the project. The .vercel directory contains local configuration files for your Vercel project.
    Removing this directory clears out any potentially outdated or corrupted local configuration.
    Running vercel again after removing the directory will re-initialize the project, creating a fresh configuration.

On macOS and Linux:

rm -rf .vercel
vercel

On Windows:

rmdir /s /q .vercel
vercel

Let us know how you get on!

Thank you for getting back to me.

I’ve tried the things you mention already.

vercel ls show me the deploys of the project

vercel link I’ve tried many times. It works only with my current name, [project name], not with the previous one [project name].ai.

Removing .vercel and redo the linking did not work either.

Can you check on your side if something has gotten stuck on your side which makes the redeploy not to work?

The name change may be why you can’t redeploy an older build. And if the project is called [project name] now, that explains why vercel link doesn’t work with [project name].ai as the name. No project with the old name currently exists.

If you link to the new project name and create a new deployment, are you able to redeploy that one?

I’m sorry if I was unclear. I have relinked it to use [project name], and that what is not working to redeploy on.

When i tried re-link to the old name the re-link didn’t work at all.

Please look in to this issue from your end.

I understand, @josefnorlin. I wouldn’t expect it to be able to relink with the old name unless you changed the project name back to the old name. The vercel link command will only work with an existing project name. If the local repo is currently linked with the new project name, that’s good news!

You should still be able to redeploy using the vercel redeploy [deployment-id or url] command. Note that this requires either the unique deployment url or the deployment id. It will fail if an existing deployment is not specified.

You should also be able to create new deployments using the vercel deploy or vercel deploy --prod command.

I’m happy to look into it further if you still run into trouble with either of those commands. I’ll need to know the project name, the error message, CLI version, and the exact steps you followed leading to the error.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.