Code Monkey home page Code Monkey logo

amplify-graphql-fragments-generator's People

Contributors

artemkloko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

amplify-graphql-fragments-generator's Issues

Cannot find module 'amplify-codegen/src/codegen-config'

First of all - Nice work! I've been looking for this exact type of thing for ages!

Unfortunately for me I get the following error when running the generate command:

Cannot find module 'amplify-codegen/src/codegen-config'
Require stack:
- /usr/local/lib/node_modules/amplify-graphql-fragments-generator/lib/commands/generate.js
- /usr/local/lib/node_modules/amplify-graphql-fragments-generator/lib/index.js
- /usr/local/lib/node_modules/@aws-amplify/cli/lib/execution-manager.js
- /usr/local/lib/node_modules/@aws-amplify/cli/lib/index.js
- /usr/local/lib/node_modules/@aws-amplify/cli/bin/amplify
/usr/local/lib/node_modules/amplify-graphql-fragments-generator/lib/commands/generate.js:1
Error: Cannot find module 'amplify-codegen/src/codegen-config'
Require stack:
- /usr/local/lib/node_modules/amplify-graphql-fragments-generator/lib/commands/generate.js
- /usr/local/lib/node_modules/amplify-graphql-fragments-generator/lib/index.js
- /usr/local/lib/node_modules/@aws-amplify/cli/lib/execution-manager.js
- /usr/local/lib/node_modules/@aws-amplify/cli/lib/index.js
- /usr/local/lib/node_modules/@aws-amplify/cli/bin/amplify
    at Object.<anonymous> (/usr/local/lib/node_modules/amplify-graphql-fragments-generator/lib/commands/generate.js:27:42)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)

This probably means you need to 'amplify-codegen' as a dependency in the package.json

Unfortunately even after installing globally npm install -g amplify-codegen I get the following call stack issue:

Generated fragments and statements successfully and saved at /Users/jimbo/Projects/roar/packages/core/graphql
(node:3627) UnhandledPromiseRejectionWarning: RangeError: Maximum call stack size exceeded
    at getType (/usr/local/lib/node_modules/amplify-graphql-fragments-generator/node_modules/amplify-graphql-docs-generator/lib/generator/utils/getType.js:4:17)
    at Object.getType [as default] (/usr/local/lib/node_modules/amplify-graphql-fragments-generator/node_modules/amplify-graphql-docs-generator/lib/generator/utils/getType.js:6:16)
    at Object.getFields (/usr/local/lib/node_modules/amplify-graphql-fragments-generator/lib/generator/getFields.js:16:40)
    at /usr/local/lib/node_modules/amplify-graphql-fragments-generator/lib/generator/getFragment.js:16:37
    at Array.map (<anonymous>)
    at Object.getFragment (/usr/local/lib/node_modules/amplify-graphql-fragments-generator/lib/generator/getFragment.js:16:10)
    at Object.getFields (/usr/local/lib/node_modules/amplify-graphql-fragments-generator/lib/generator/getFields.js:43:40)
    at /usr/local/lib/node_modules/amplify-graphql-fragments-generator/lib/generator/getFragment.js:16:37
    at Array.map (<anonymous>)
    at Object.getFragment (/usr/local/lib/node_modules/amplify-graphql-fragments-generator/lib/generator/getFragment.js:16:10)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3627) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3627) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Maybe my schema has a self-referencing model or two models which reference each other and its getting caught in a recursive loop?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.