LimeChain / matchstick

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

Error MacOs M1: Could not create WasmInstance from valid module with context: unknown import: `wasi_snapshot_preview1::fd_write` has not been defined' #429

Closed FabienCoutant closed 2 months ago

FabienCoutant commented 2 months ago

Hello, I started a new subgraph repo using the graph init cli from Thegraph documentation. I had follow the matchstick install setup from Thegraph doc When running graph test I'm getting the following error :

Capture d’écran 2024-06-20 à 17 34 28

I'm using node version

╰─ node -v
v20.11.1

I'm also using homebrew that has install postgresql under /opt/homebrew/opt/postgresql@14/ folder, and I had copy the libpq.5.dylib where the doc suggest /usr/local/opt/postgresql/lib/libpq.5.dylib.

Here my repo dependencies:

    "dependencies": {
        "@graphprotocol/graph-cli": "0.74.1",
        "@graphprotocol/graph-ts": "0.32.0"
    },
    "devDependencies": {
        "@commitlint/cli": "^19.3.0",
        "@commitlint/config-conventional": "^19.2.2",
        "cross-env": "^7.0.3",
        "env-cmd": "^10.1.0",
        "husky": "^9.0.11",
        "matchstick-as": "^0.6.0",
        "mustache": "^4.2.0"
    },
FabienCoutant commented 2 months ago

Found the issue. Error is trigger by a console.log