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)
I ran into this as well, and in my case the problem was that anchor test expects mocha to be installed globally (npm i -g mocha or equivalent), which I forgot to do.
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.
Great tutorial. Got me started from scratch.
On the first test however I am receiving the following error. Any thoughts?
Failed to run test: mocha -t 1000000 tests/: No such file or directory (os error 2)
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)
I ran into this as well, and in my case the problem was that
anchor test
expects mocha to be installed globally (npm i -g mocha
or equivalent), which I forgot to do.