question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to locate custom transformer during gql compile

See original GitHub issue

I have read this article https://docs.amplify.aws/cli/plugins/authoring#authoring-custom-graphql-transformers--directives but no mention on how to use a custom transformer.

I have tried graphql-default-value-transformer, with the following setting in my amplify/backend/api/xx/transform.conf.json

{
    "Version": 5,
    "ElasticsearchWarning": true,
    "transformers": [
        "graphql-default-value-transformer"
    ]
}

But I got this error when I run amplify push

Cannot find module 'xxxxx/~/.npm-global/lib/node_modules/graphql-default-value-transformer'

(I have installed the package both locally and globally.)

How to fix the issue

I found this is an issue of the upstream lib global-dirs. So I created an issue at here. https://github.com/sindresorhus/global-dirs/issues/21 Amplify team should upgrade the global-dirs once the issue has been fixed.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
edwardfoylecommented, Jan 14, 2021

Thanks for digging into that! Marking this as a dependency issue

0reactions
github-actions[bot]commented, Aug 18, 2021

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS Amplify announces the new GraphQL Transformer v2 ...
Migrate to the new GraphQL Transformer from version 1​​ Some v1 capabilities, such as using custom resolvers, overwritten resolvers, or using a ...
Read more >
How to load a custom transformer in Spark 2.4 - Stack Overflow
This suggests to me that it can't find my transformer's constructor, which doesn't really make sense to me. MCVE: import org.apache.spark.sql.{ ...
Read more >
Two Ways to Build Your Own Custom Scikit Learn Transformers
Do you really need a custom transformer? The next question to consider is if you even need a custom transformer in the first...
Read more >
Troubleshooting Common Errors - Gatsby
Error: ReferenceError: window is not defined when running gatsby build ... If you see errors about not being able to find a resource...
Read more >
"Delay" alarm processing in PEM ... - BMC Community
I have a tool that, for reasons I won't get into here, generates a large number ... It appears my choices are to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found