anchor
anchor copied to clipboard
running `anchor test` in `/examples/tutorial/basic-0` results in error
to repro
- fresh clone
- go into
/examples/tutorial/basic-0
- run
npm i
- run
anchor test
error: error Command "mocha" not found.
is it expected for mocha to be globally installed? it would be better for the dependencies to be localized so that running the above steps will not error
Run npm i
in the workspace root /examples/tutorial
then run anchor test
.
Install mocha
npm install -g mocha
It is a dependency error.
Run
npm i
in the workspace root/examples/tutorial
then runanchor test
.
This fixed it, however, it leads to a new issue
https://github.com/coral-xyz/anchor/blob/167c8ecbf55e838fc5bfd4903e493363c41b6e45/.github/workflows/reusable-tests.yaml#L67