Skip to content

ReferenceError: name is not defined #633

@Grohden

Description

@Grohden

I don't know why, but this name variable is not available for this function:

if (!raw.schema || !raw.documents || !raw.plugins)
printError(new Error(`A config requires a "${name}" field`));
const hasUnnecessaryPlugin = raw.plugins.some((p) => {
const name = typeof p === 'string' ? p : Object.keys(p)[0];
return name === 'typescript';
});

(maybe this is referring to the global dom name and ts accepts it?)
so the error report does not report the error

edit: some context

schema: "http://localhost:3000/graphql"
# documents: "app/javascript/**/*.gql" # commented this line, which is probably my issue
plugins:
  - typescript-operations
  - typescript-react-apollo

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