graph-tooling
graph-tooling copied to clipboard
Graph test command fails with 'No such file or directory'
Which packages are impacted by your issue?
@graphprotocol/graph-cli
Describe the issue
Even on the demo-subgraph repository, I am unable to run the tests. Matchstick is failing with a "No such file or directory" error, but there is no detail of what it cannot find. I am running WSL 2, 5.15.90.1-microsoft-standard-WSL2.
pnpm run test
> [email protected] test /home/baracoso/projects/LimeChain/demo-subgraph
> graph test
Skipping download/install step because binary already exists at /home/baracoso/projects/LimeChain/demo-subgraph/node_modules/.pnpm/[email protected][email protected]/node_modules/binary-install-raw/bin/0.5.4
___ ___ _ _ _ _ _
| \/ | | | | | | | (_) | |
| . . | __ _| |_ ___| |__ ___| |_ _ ___| | __
| |\/| |/ _` | __/ __| '_ \/ __| __| |/ __| |/ /
| | | | (_| | || (__| | | \__ \ |_| | (__| <
\_| |_/\__,_|\__\___|_| |_|___/\__|_|\___|_|\_\
Compiling...
💬 Compiling token-lock-wallet/token-lock-wallet...
thread 'main' panicked at '🆘 Internal error during compilation: No such file or directory (os error 2).
Command path: "/home/baracoso/projects/LimeChain/demo-subgraph/node_modules/assemblyscript/bin/asc"
Globals path: "/home/baracoso/projects/LimeChain/demo-subgraph/node_modules/@graphprotocol/graph-ts/global/global.ts"
Libs folder: "/home/baracoso/projects/LimeChain/demo-subgraph/node_modules"', src/compiler/mod.rs:131:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
ELIFECYCLE Test failed. See above for more details.
Reproduction
github.com/LimeChain/demo-subgraph
Steps to Reproduce the Bug or Issue
pnpm install
pnpm run build
pnpm run test
```
Note: I get the same results with `yarn`
### Expected behavior
tests passing
### Screenshots or Videos
_No response_
### Platform
- OS: WSL
- NodeJS: 18.9.0
- `@graphprotocol/*` version(s):
- "@graphprotocol/graph-cli": "^0.47.0"
- "@graphprotocol/graph-ts": "^0.29.1"
### Subgraph Manifest
_No response_
### Subgraph GraphQL Schema
_No response_
### Additional context
_No response_
ideas @dimitrovmaksim?
It doesn't work well with pnpm, because it depends on the assemblyscript package to be installed in node_nodules
This Issue may be helpful https://github.com/LimeChain/matchstick/issues/324#issuecomment-1545873270. Also when installing the assemblyscript package keep in mind to use version 0.19.x,
Thank you @dimitrovmaksim, changing the assemblyscript package version to ^0.19.0, and using yarn instead (the recommended package manager here I believe) fixed it