LimeChain / matchstick

🔥 Unit testing framework for Subgraph development on The Graph protocol. ⚙️
MIT License
210 stars 18 forks source link

matchstick fails to find asc binary on M1 Macbook #356

Closed mrod502 closed 2 years ago

mrod502 commented 2 years ago

When running graph test from /Users/<user>/code/rift/rift-subgraph/rinkeby, the following occurs:

💬 Compiling vault/updated_vault...
thread 'main' panicked at '🆘 Internal error during compilation: No such file or directory (os error 2).
Command path: "/Users/<user>/code/rift/rift-subgraph/rinkeby/node_modules/assemblyscript/bin/asc"
Globals path: "/Users/<user>/code/rift/rift-subgraph/rinkeby/node_modules/@graphprotocol/graph-ts/global/global.ts"
Libs folder: "/Users/<user>/code/rift/rift-subgraph/rinkeby/node_modules"', src/compiler.rs:131:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error Command failed with exit code 101.

In /Users/<user>/code/rift/rift-subgraph/rinkeby/node_modules/assemblyscript/bin/, there exist 2 files:

dimitrovmaksim commented 2 years ago

What package manager do you use?

mrod502 commented 2 years ago

What package manager do you use?

Node package manager being used is yarn 1.22.19 System package manager being used is homebrew 3.5.2

dimitrovmaksim commented 2 years ago

Do you use yarn workspaces?

If not, you can try to delete node_modules folder and any lock files(yarn.lock and/or package-lock.json) and try to install the deps again

mrod502 commented 2 years ago

Do you use yarn workspaces?

If not, you can try to delete node_modules folder and any lock files(yarn.lock and/or package-lock.json) and try to install the deps again

Did a clean install of dependencies, seems to have fixed the problem. Thanks!

coreyar commented 2 years ago

I am encountering this issue using yarn workspaces. Edit: I was able to solve this by setting nmHoistingLimits

dimitrovmaksim commented 2 years ago

You can also try to configure the node_modules folder(libsFolder) which matchstick should use with https://thegraph.com/docs/en/developing/unit-testing-framework/#configuration