1

I am trying to initialize a subgraph using the Graph Protocol but keep getting the error below. My npm version is 9.1.2, yarn version is 3.2.3, node version is 18.12.1, and graph version is 0.36.1. Appreciate the help!!

> √ Fetching ABI from Etherscan √ Contract Name · NftMarketplace √ Index
> contract events as entities (Y/n) · true ———   Generate subgraph  
> Write subgraph to directory √ Create subgraph scaffold √ Initialize
> networks config √ Initialize subgraph repository × Failed to install
> dependencies: Command failed: yarn
> 
> C:\Users\User\AppData\Roaming\nvm\v14.17.0\node_modules\@graphprotocol\graph-cli\node_modules\gluegun\build\index.js:13
>     throw up;
>     ^
> 
> Error: Command failed: yarn
> 
>     at ChildProcess.exithandler (child_process.js:319:12)
>     at ChildProcess.emit (events.js:376:20)
>     at maybeClose (internal/child_process.js:1055:16)
>     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {   killed: false,   code: 1,  
> signal: null,   cmd: 'yarn',   stderr: '' }

1 Answer 1

1

I managed to solve this issue. The reason was that I have both package.json and yarn.lock in my upper directory (Users/User). The problem was solved after deleting both files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.