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

Error: Site not found. Please rerun "netlify link" #51

Open
tpluscode opened this issue Aug 17, 2023 · 2 comments
Open

Error: Site not found. Please rerun "netlify link" #51

tpluscode opened this issue Aug 17, 2023 · 2 comments

Comments

@tpluscode
Copy link
Collaborator

I don't know why, my deployments stopped working after a period of inactivity:

Error: Site not found. Please rerun "netlify link"

I did not do anything. Now I recreated the access token and made sure that the SITE ID is correct but still the action fails. Have you seen this before?

@jsmrcaga
Copy link
Owner

Hi @tpluscode !
I have not! It looks like the CLI does not know anymore what site you are talking about
https://docs.netlify.com/cli/get-started/#link-and-unlink-sites

From what I can see in the docs the link command just adds an id to the .netlify/state.json of your project.
BUT
https://docs.netlify.com/cli/get-started/#link-with-an-environment-variable

Link with an environment variable
Alternatively, you can link to a site by finding the site ID
in the Netlify UI, then adding it to your local terminal environment:

Go to 
Site configuration > General > Site details > Site information,
and copy the value for Site ID.

Assign the ID to a NETLIFY_SITE_ID environment variable,
in your terminal settings or in the UI of a Continuous Integration (CI) tool.

So having set the NETLIFY_SITE_ID env var should be enough.

Can you verify if your env var is still ok and matches your project ?

Since we are using the Github-bundled version of netlify-cli they might have updated it :/ inconvenient for actions now that I think about it

@tpluscode
Copy link
Collaborator Author

What I did was to complete recreate that site on netlify and changed the site id. It deployed successfully then. Will try your suggestions if I encounter this again

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

2 participants