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

Cannot perform codegen #26

Open
paymog opened this issue Jun 23, 2022 · 1 comment · May be fixed by #50
Open

Cannot perform codegen #26

paymog opened this issue Jun 23, 2022 · 1 comment · May be fixed by #50

Comments

@paymog
Copy link

paymog commented Jun 23, 2022

Whenever I try to run some codegen I get the following error which is coming from gluegun:

 ❯❯❯ NETWORK_NAME=matic yarn prepare
yarn run v1.22.19
$ ts-node ./templatify.ts && yarn codegen
🎉 subgraph successfully generated for matic

$ graph codegen --debug --output-dir src/types/
node:internal/modules/cjs/loader:361
      throw err;
      ^

Error: Cannot find module '/home/ubuntu/code/polymarket-subgraph/node_modules/gluegun/build/index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:353:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/ubuntu/code/polymarket-subgraph/node_modules/@graphprotocol/graph-cli/src/cli.js:4:27)
    at Module._compile (node:internal/modules/cjs/loader:1099:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:975:32) {
  code: 'MODULE_NOT_FOUND',
  path: '/home/ubuntu/code/polymarket-subgraph/node_modules/gluegun/package.json',
  requestPath: 'gluegun'
}

Node.js v17.9.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

It seems the graph-cli isn't working correctly and it's not clear how/why. Has anyone run into this before?

@paymog
Copy link
Author

paymog commented Jun 23, 2022

Looks to be related to graphprotocol/graph-tooling#814

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

Successfully merging a pull request may close this issue.

1 participant