anchor icon indicating copy to clipboard operation
anchor copied to clipboard

running `anchor test` in `/examples/tutorial/basic-0` results in error

Open nazreen opened this issue 2 years ago • 3 comments

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

nazreen avatar Apr 19 '22 23:04 nazreen

Run npm i in the workspace root /examples/tutorial then run anchor test.

tomlinton avatar Apr 20 '22 12:04 tomlinton

Install mocha npm install -g mocha It is a dependency error.

mateolafalce avatar Apr 24 '22 15:04 mateolafalce

Run npm i in the workspace root /examples/tutorial then run anchor test.

This fixed it, however, it leads to a new issue

EduardoBDonovan avatar Jun 16 '22 18:06 EduardoBDonovan

https://github.com/coral-xyz/anchor/blob/167c8ecbf55e838fc5bfd4903e493363c41b6e45/.github/workflows/reusable-tests.yaml#L67

acheroncrypto avatar Nov 05 '23 09:11 acheroncrypto