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

compiling the data source error #103

Open
userbox020 opened this issue Jan 8, 2024 · 1 comment
Open

compiling the data source error #103

userbox020 opened this issue Jan 8, 2024 · 1 comment

Comments

@userbox020
Copy link

Hello, i was following the instructions on the readme to deploy a subgraph,
but after the npm run deploy:{network} in my case npm run deploy:sepolia , i get the follow error in the compilig data source seccion.

  Compile data source: CollectionFactory => build/CollectionFactory/CollectionFactory.wasm
  Compile data source: CollectionFactoryV3 => build/CollectionFactory/CollectionFactory.wasm (already compiled)
  Compile data source: Marketplace => build/Marketplace/Marketplace.wasm
⠋ Compile subgraphERROR TS6054: File 'src/modules/NFT.ts' not found.

 import { getNFTId, updateNFTOrderProperties, cancelActiveOrder } from '../modules/NFT'
                                                                       ~~~~~~~~~~~~~~~~
 in src/handlers/marketplace.ts(4,71)

ERROR TS6054: File 'src/modules/Count.ts' not found.

 import { buildCountFromOrder } from '../modules/Count'
                                     ~~~~~~~~~~~~~~~~~~
 in src/handlers/marketplace.ts(5,37)

ERROR TS6054: File 'src/modules/Order.ts' not found.

 import * as status from '../modules/Order'
                         ~~~~~~~~~~~~~~~~~~
 in src/handlers/marketplace.ts(6,25)

✖ Failed to compile subgraph: Failed to compile data source mapping: 3 parse error(s)
Error: Failed to compile data source mapping: 3 parse error(s)
    at Compiler._compileDataSourceMapping (/media/2TB_M2/graph_node/collections-graph/node_modules/@graphprotocol/graph-cli/dist/compiler/index.js:297:19)
    at /media/2TB_M2/graph_node/collections-graph/node_modules/@graphprotocol/graph-cli/dist/compiler/index.js:201:167
    at updateInDeeply (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2121:22)
    at updateInDeeply (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2134:23)
    at updateInDeeply (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2134:23)
    at updateIn$1 (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2099:24)
    at Map.updateIn (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2180:12)
    at /media/2TB_M2/graph_node/collections-graph/node_modules/@graphprotocol/graph-cli/dist/compiler/index.js:201:115
    at /media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:3321:30
    at List.withMutations (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2367:5)
UNCAUGHT EXCEPTION: Error: The AssemblyScript compiler crashed when compiling this file: 'src/handlers/marketplace.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

  Compile data source: CollectionFactory => build/CollectionFactory/CollectionFactory.wasm
  Compile data source: CollectionFactoryV3 => build/CollectionFactory/CollectionFactory.wasm (already compiled)
  Compile data source: Marketplace => build/Marketplace/Marketplace.wasm
⠋ Compile subgraphERROR TS6054: File 'src/modules/NFT.ts' not found.

 import { getNFTId, updateNFTOrderProperties, cancelActiveOrder } from '../modules/NFT'
                                                                       ~~~~~~~~~~~~~~~~
 in src/handlers/marketplace.ts(4,71)

ERROR TS6054: File 'src/modules/Count.ts' not found.

 import { buildCountFromOrder } from '../modules/Count'
                                     ~~~~~~~~~~~~~~~~~~
 in src/handlers/marketplace.ts(5,37)

ERROR TS6054: File 'src/modules/Order.ts' not found.

 import * as status from '../modules/Order'
                         ~~~~~~~~~~~~~~~~~~
 in src/handlers/marketplace.ts(6,25)

✖ Failed to compile subgraph: Failed to compile data source mapping: 3 parse error(s)
Error: Failed to compile data source mapping: 3 parse error(s)
    at Compiler._compileDataSourceMapping (/media/2TB_M2/graph_node/collections-graph/node_modules/@graphprotocol/graph-cli/dist/compiler/index.js:297:19)
    at /media/2TB_M2/graph_node/collections-graph/node_modules/@graphprotocol/graph-cli/dist/compiler/index.js:201:167
    at updateInDeeply (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2121:22)
    at updateInDeeply (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2134:23)
    at updateInDeeply (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2134:23)
    at updateIn$1 (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2099:24)
    at Map.updateIn (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2180:12)
    at /media/2TB_M2/graph_node/collections-graph/node_modules/@graphprotocol/graph-cli/dist/compiler/index.js:201:115
    at /media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:3321:30
    at List.withMutations (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2367:5)
UNCAUGHT EXCEPTION: Error: The AssemblyScript compiler crashed when compiling this file: 'src/handlers/marketplace.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
  Compile data source: CollectionFactory => build/CollectionFactory/CollectionFactory.wasm
  Compile data source: CollectionFactoryV3 => build/CollectionFactory/CollectionFactory.wasm (already compiled)
  Compile data source: Marketplace => build/Marketplace/Marketplace.wasm
⠋ Compile subgraphERROR TS6054: File 'src/modules/NFT.ts' not found.

 import { getNFTId, updateNFTOrderProperties, cancelActiveOrder } from '../modules/NFT'
                                                                       ~~~~~~~~~~~~~~~~
 in src/handlers/marketplace.ts(4,71)

ERROR TS6054: File 'src/modules/Count.ts' not found.

 import { buildCountFromOrder } from '../modules/Count'
                                     ~~~~~~~~~~~~~~~~~~
 in src/handlers/marketplace.ts(5,37)

ERROR TS6054: File 'src/modules/Order.ts' not found.

 import * as status from '../modules/Order'
                         ~~~~~~~~~~~~~~~~~~
 in src/handlers/marketplace.ts(6,25)

✖ Failed to compile subgraph: Failed to compile data source mapping: 3 parse error(s)
Error: Failed to compile data source mapping: 3 parse error(s)
    at Compiler._compileDataSourceMapping (/media/2TB_M2/graph_node/collections-graph/node_modules/@graphprotocol/graph-cli/dist/compiler/index.js:297:19)
    at /media/2TB_M2/graph_node/collections-graph/node_modules/@graphprotocol/graph-cli/dist/compiler/index.js:201:167
    at updateInDeeply (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2121:22)
    at updateInDeeply (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2134:23)
    at updateInDeeply (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2134:23)
    at updateIn$1 (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2099:24)
    at Map.updateIn (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2180:12)
    at /media/2TB_M2/graph_node/collections-graph/node_modules/@graphprotocol/graph-cli/dist/compiler/index.js:201:115
    at /media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:3321:30
    at List.withMutations (/media/2TB_M2/graph_node/collections-graph/node_modules/immutable/dist/immutable.js:2367:5)
UNCAUGHT EXCEPTION: Error: The AssemblyScript compiler crashed when compiling this file: 'src/handlers/marketplace.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

also the discord link expired

@userbox020
Copy link
Author

it says that there are some files missing inside the folder modules and indeed, i dont have those files, dont know how to create them.

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

1 participant