Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Running the subgraph locally #836

Open
expandboard opened this issue Feb 12, 2025 · 1 comment
Open

Error in Running the subgraph locally #836

expandboard opened this issue Feb 12, 2025 · 1 comment

Comments

@expandboard
Copy link

expandboard commented Feb 12, 2025

This error be arisen when the subgraph is ran locally

1. Run anvil

anvil --host 0.0.0.0 --gas-limit 100000000000 --base-fee 1

2. Deploy the contracts

cd contracts
./deploy local

3. Run the graph node

cd subgraph
./start-graph

4. Deploy the subgraph

cd subgraph
./deploy-subgraph local --version v1 --create

Hardware

OS Ubuntu 24.10
RAM 16GB
:~/liquity/bold/subgraph$ sudo ./deploy-subgraph local --version v1 --create

Deploying subgraph:

  NAME:               liquity2/liquity2
  VERSION:            v1
  GRAPH NODE:         http://localhost:8020/
  IPFS NODE:          http://localhost:5001/
  CREATE:             yes
  DEBUG:              no


- Update sources network
  Reading networks config
- Update sources network
  Skip 'BoldToken': No changes to network configuration
- Update sources network
  Skip 'Governance': No changes to network configuration
- Update sources network
✔ Update sources network
- Apply migrations
  Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2
- Apply migrations
  Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3
- Apply migrations
  Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4
- Apply migrations
  Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5
- Apply migrations
  Skip migration: Bump mapping apiVersion from 0.0.5 to 0.0.6
- Apply migrations
  Skip migration: Bump manifest specVersion from 0.0.1 to 0.0.2
- Apply migrations
-   Skip migration: Bump manifest specVersion from 0.0.2 to 0.0.4
- Apply migrations
✔ Apply migrations
- Load subgraph from subgraph.yaml
✔ Load subgraph from subgraph.yaml
- Compile subgraph
  Compile data source: BoldToken => build/BoldToken/BoldToken.wasm
- Compile subgraph
✖ Failed to compile subgraph: Failed to compile data source mapping: 7 parse error(s)
Error: EEXIT: 1
    at Object.exit (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/lib/errors/index.js:21:11)
    at BuildCommand.exit (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/lib/command.js:131:23)
    at BuildCommand.run (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@graphprotocol/graph-cli/dist/commands/build.js:76:22)
    at async BuildCommand._run (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/lib/command.js:117:22)
    at async Config.runCommand (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/lib/config/config.js:329:25)
    at async Object.run (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/lib/main.js:89:16)
Error: The AssemblyScript compiler crashed when compiling this file: 'src/BoldToken.mapping.ts'
Suggestion: try to comment the whole file and uncomment it little by little while re-running the graph-cli until you isolate the line where the problem happens.
Also, please contact us so we can make the CLI better by handling errors like this. You can reach out in any of these links:
- Discord channel: https://discord.gg/eM8CA6WA9r
- Github issues: https://github.com/graphprotocol/graph-tooling/issues/new/choose
    at process.<anonymous> (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@graphprotocol/graph-cli/dist/compiler/asc.js:29:11)
    at process.emit (node:events:536:35)
    at process.exit (node:internal/process/per_thread:182:15)
    at Object.handle (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/lib/errors/handle.js:33:21)
    at module.exports (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/handle.js:1:58)

  Error: - Update sources network

  Reading networks config
- Update sources network
  Skip 'BoldToken': No changes to network configuration
- Update sources network
  Skip 'Governance': No changes to network configuration
- Update sources network
✔ Update sources network
- Apply migrations
  Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2
- Apply migrations
  Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3
- Apply migrations
  Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4
- Apply migrations
  Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5
- Apply migrations
  Skip migration: Bump mapping apiVersion from 0.0.5 to 0.0.6
- Apply migrations
  Skip migration: Bump manifest specVersion from 0.0.1 to 0.0.2
- Apply migrations
  Skip migration: Bump manifest specVersion from 0.0.2 to 0.0.4
- Apply migrations
✔ Apply migrations
- Load subgraph from subgraph.yaml
✔ Load subgraph from subgraph.yaml
- Compile subgraph
  Compile data source: BoldToken => build/BoldToken/BoldToken.wasm
- Compile subgraph
✖ Failed to compile subgraph: Failed to compile data source mapping: 7 parse error(s)
Error: EEXIT: 1

    at Object.exit (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/lib/errors/index.js:21:11)
    at BuildCommand.exit (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/lib/command.js:131:23)
    at BuildCommand.run (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@graphprotocol/graph-cli/dist/commands/build.js:76:22)
    at async BuildCommand._run (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/lib/command.js:117:22)
    at async Config.runCommand (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/lib/config/config.js:329:25)
    at async Object.run (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/lib/main.js:89:16)
Error: The AssemblyScript compiler crashed when compiling this file: 'src/BoldToken.mapping.ts'
Suggestion: try to comment the whole file and uncomment it little by little while re-running the graph-cli until you isolate the line where the problem happens.
Also, please contact us so we can make the CLI better by handling errors like this. You can reach out in any of these links:
- Discord channel: https://discord.gg/eM8CA6WA9r
- Github issues: https://github.com/graphprotocol/graph-tooling/issues/new/choose
    at process.<anonymous> (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@graphprotocol/graph-cli/dist/compiler/asc.js:29:11)
    at process.emit (node:events:536:35)
    at process.exit (node:internal/process/per_thread:182:15)
    at Object.handle (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/lib/errors/handle.js:33:21)
    at module.exports (/home/ubuntu/liquity/bold/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@oclif/core/handle.js:1:58)
    at Object.main (/home/ubuntu/liquity/bold/subgraph/cli/deploy-subgraph.ts:157:9)
    exit code: 1

@expandboard expandboard changed the title Error in Run the subgraph locally Error in Running the subgraph locally Feb 13, 2025
@bpierre
Copy link
Contributor

bpierre commented Feb 18, 2025

@expandboard do you get any error when running this command?

cd subgraph
pnpm asc src/BoldToken.mapping.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants