Skip to content

TypeError: module.require is not a function error when running with turbopack #8004

@sam-btrt

Description

@sam-btrt

Issue Description

Apologies if this should be an FR, or an issue on a different project. I'm finding it hard to work out if nextjs + turbopack + apollo server is supposed to be supported or not, and what's stopping it from working at the moment.

In any case, when trying to run next dev --turbo on a project with apollo server, I get a bunch of TypeError: module.require is not a function errors whenever the gql endpoint is hit, and no data is returned. Running without --turbo (i.e. using webpack) works fine.

Related issues:
apollo-server-integrations/apollo-server-integration-next#172
apollo-server-integrations/apollo-server-integration-next#232
vercel/next.js#72573

Thanks

Link to Reproduction

See vercel/next.js#72573

Reproduction Steps

See vercel/next.js#72573

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions