Skip to content

1.5.0 not working in production environment #59

@swelther

Description

@swelther

Beginning with version 1.5.0 of this gem the GraphiQL frontend does not load in production environments. Chrome console output:

application-62bfd22d15244d19e3fe71894ec33a25361eac62e7b985cf9206122d51a6e0ae.js:22 Uncaught Error: Cannot use t "__Schema" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
    at i (application-62bfd22d15244d19e3fe71894ec33a25361eac62e7b985cf9206122d51a6e0ae.js:22)
    ....
graphiql:45 Uncaught ReferenceError: GraphiQL is not defined
    at graphiql:45

Tested with an empty Rails 5.1.4 app.

Any idea why or what? I'm not a react/node/js guy 😉

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions