I just ran into the same problem and found this post while trying to solve it.
My problem was that I had the npm anchor package installed globally (which I did before I realized that it doesn't work on the M1 mac currently). Uninstalling it fixed the issue. (of course you also need to build anchor for it to work properly on the M1)
npm uninstall -g @project-serum/anchor-cli
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Never mind. It appears to have been an ID10T issue.
Just for future adventurers,
Was the problem that you hadn't changed directory into example1 or example2?
I just ran into the same problem and found this post while trying to solve it.
My problem was that I had the npm anchor package installed globally (which I did before I realized that it doesn't work on the M1 mac currently). Uninstalling it fixed the issue. (of course you also need to build anchor for it to work properly on the M1)