Events

TheGraph 未在本地連接到 IPFS

  • June 2, 2021

我使用本教程設置了一個 Graph 本地節點。當我嘗試部署它時,它不會出現以下錯誤消息:

Add file to IPFS build/schema.graphql
⠋ Upload subgraph to IPFSFile:  {
 path: 'schema.graphql',
 content: <Buffer 74 79 70 65 20 6d 69 6e 74 65 64 4e 46 54 53 20 40 65 6e 74 69 74 79 7b 0a 20 20 69 64 3a 20 49 44 21 0a 20 20 23 73 6f 75 72 63 65 46 54 49 64 3a 20 ... 47 more bytes>
}
✖ Failed to upload subgraph to IPFS: Failed to upload file to IPFS: {"statusCode":404}
Error: Failed to upload file to IPFS: {"statusCode":404}

在我的 Docker 設置中,IPFS 定義為:

ipfs: 'ipfs:5001'

從圖形呼叫時:

"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://127.0.0.1:5001/ **/**"

關於下一步嘗試什麼的任何想法?提前致謝。

問題是我在埠 5001 上執行了 RemixIDE,並且 subgraph 沒有給我“埠不可用”錯誤或任何東西。開啟 RemixIDE 解決了這個問題。

引用自:https://ethereum.stackexchange.com/questions/100117