How to recover from "site not found" error with Netlify Dev

$ netlify dev
◈ Netlify Dev ◈
{ JSONHTTPError: Not Found
at NetlifyAPI.getSite (/usr/local/lib/node_modules/netlify-cli/node_modules/netlify/src/open-api/index.js:162:15)
at processTicksAndRejections (internal/process/next_tick.js:81:5)
name: ‘JSONHTTPError’,
status: 404,
json: { code: 404, message: ‘Not Found’ } }
◈ Error retrieving site data for site 9ab7…snip…b1b5fa. Double-check your login status with ‘netlify status’ or contact support with details of your error.

(netlify status returns valid info)

It appears that I have screwed this up at some point in the past; most likely when I deleted the project on netlify.com and started over. The site referenced in the error message is not the site ID for the current incarnation of the project on netlify.com. I do not consider this a bug but it does pose the problem: “how to recover and start over” with Netlify Dev.

I am successfully using Netlify Dev on other projects.

After I posted this I realized I had not looked at netlify --help. A couple of commands looked like they might be promising so I tried
netlify unlink
netlify link
I’m not sure the unlink actually did anything but I was able to recover so that I have
netlify dev --live working now.
Perhaps my embarrassment over “less-than-sufficient” pre-posting research will at least help someone who is having the same issue.

thanks for posting what you tried! This definitely helps other users. :muscle: