Skip to content

graphql-codegen-client-preset weird AST version number #562

@Arno500

Description

@Arno500

Describe the bug

---------------------------
failed to analyze ecmascript module '[project]/src/proxy.ts [middleware] (ecmascript)'

Caused by:
- failed to parse [project]/src/proxy.ts
- Transforming and/or parsing of [project]/src/proxy.ts failed
- Plugin's AST schema version is not compatible with host's. Host: 1, Plugin: 24406387

Debug info:
- Execution of get_written_endpoint_with_issues_operation failed
- Execution of endpoint_write_to_disk failed
- Execution of <MiddlewareEndpoint as Endpoint>::output failed
- Execution of *all_server_paths failed
- Execution of MiddlewareEndpoint::output_assets failed
- Execution of MiddlewareEndpoint::node_chunk failed
- Execution of MiddlewareEndpoint::entry_module failed
- Execution of *AssetIdent::path failed
- Execution of *Module::ident failed
- Execution of *ProcessResult::module failed
- Execution of <ModuleAssetContext as AssetContext>::process failed
- Execution of *EcmascriptExports::split_locals_and_reexports failed
- Execution of <EcmascriptModuleAsset as EcmascriptChunkPlaceable>::get_exports failed
- Execution of analyze_ecmascript_module failed
- failed to analyze ecmascript module '[project]/src/proxy.ts [middleware] (ecmascript)'
- Execution of <EcmascriptModuleAsset as EcmascriptParsable>::failsafe_parse failed
- Execution of parse failed
- failed to parse [project]/src/proxy.ts
- Transforming and/or parsing of [project]/src/proxy.ts failed
- Plugin's AST schema version is not compatible with host's. Host: 1, Plugin: 24406387

URL to minimal reproduction

https://github.com/Arno500/swc-gql-plugin-repro
This cannot work on StackBlitz due to their WebContainers technology running WASM and Turbopack not supporting WASM builds for now.

Expected behavior
I would expect the "AST schema version" to be a bit more normal than "24406387", and the plugin to work.

Additional context
This has been an issue since the 0.6.0 version (excluded). All versions after have this bug, but 0.6.0 is working fine with Next 16.0.10.
#550 was quickly closed with a link to the supported versions, but:

  • graphql-codegen-client-preset is not in the list. Is it not supported at all?
  • it's working on the latest version of Next, with an old version, so it does not seem up to date for this one

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