graphql-code-generator icon indicating copy to clipboard operation
graphql-code-generator copied to clipboard

@graphql-codegen/client-preset-swc-plugin ...

Open huv1k opened this issue 1 year ago • 19 comments

Which packages are impacted by your issue?

@graphql-codegen/client-preset

Describe the bug

New @graphql-codegen/client-preset and @graphql-codegen/client-preset-swc-plugin doesn't work with the latest Next.js version. It panics when trying to build or run a development server and it crashes. When using the old babel plugin there wasn't such a problem. I know it's still early in development, but sadly it doesn't work.

Your Example Website or App

https://github.com/huv1k/nextjs-auth-prisma

Steps to Reproduce the Bug or Issue

  1. Clone https://github.com/huv1k/nextjs-auth-prisma
  2. Install dependencies using yarn install
  3. Run yarn dev or yarn build
  4. Process panicked

Expected behavior

I would expect the build to finish or the dev server to start, but it crashes.

Screenshots or Videos

CleanShot 2023-05-22 at 13 35 50@2x

Platform

  • OS: macOS 13.0.1
  • NodeJS: 18.16.0
  • graphql version: 16.6.0
  • @graphql-codegen/cli: 3.3.0
  • @graphql-codegen/client-preset: 3.0.1
  • @graphql-codegen/client-preset-swc-plugin: 0.2.0

Codegen Config File

No response

Additional context

No response

huv1k avatar May 22 '23 11:05 huv1k

I can confirm that I get the same issue/error when using the latest version of the Vite react-swc plugin.

RichiCoder1 avatar Jun 01 '23 22:06 RichiCoder1

When will this be fixed ?

johnoscott avatar Jul 18 '23 04:07 johnoscott

I have the same issue but with Vite.

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:266:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/rip21/Projects/core/fe/app/src/main.tsx")'

Caused by:
    0: failed to invoke `/Users/rip21/Projects/core/node_modules/.pnpm/@[email protected]/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm` as js transform plugin at /Users/rip21/Projects/core/node_modules/.pnpm/@[email protected]/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm
    1: RuntimeError: unreachable', /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.14/src/plugin.rs:162:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("/Users/rip21/Projects/core/fe/app/src/main.tsx")'

Caused by:
    0: failed to invoke `/Users/rip21/Projects/core/node_modules/.pnpm/@[email protected]/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm` as js transform plugin at /Users/rip21/Projects/core/node_modules/.pnpm/@[email protected]/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm
    1: RuntimeError: unreachable
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:266:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/rip21/Projects/core/fe/app/src/main.tsx")'

Caused by:
    0: failed to invoke `/Users/rip21/Projects/core/node_modules/.pnpm/@[email protected]/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm` as js transform plugin at /Users/rip21/Projects/core/node_modules/.pnpm/@[email protected]/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm
    1: RuntimeError: unreachable', /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.14/src/plugin.rs:162:14
4:18:54 PM [vite] Internal server error: failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("/Users/rip21/Projects/core/fe/app/src/main.tsx")'

Caused by:
    0: failed to invoke `/Users/rip21/Projects/core/node_modules/.pnpm/@[email protected]/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm` as js transform plugin at /Users/rip21/Projects/core/node_modules/.pnpm/@[email protected]/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm
    1: RuntimeError: unreachable
  Plugin: vite:react-swc
  File: /Users/rip21/Projects/core/fe/app/src/main.tsx

RIP21 avatar Jul 19 '23 14:07 RIP21

Please specify the Next.js version where this breaks.

nandorojo avatar Jul 27 '23 19:07 nandorojo

Same problem here when trying to buil NX lib when configuring .swcrc file

 *  Executing task: npx nx run data-layer:build --configuration=development 


> nx run data-layer:build:development

Compiling with SWC for data-layer...
thread 'thread 'thread '<unnamed><unnamed><unnamed>' panicked at '' panicked at '' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutErrorcalled `Result::unwrap()` on an `Err` value: LayoutErrorcalled `Result::unwrap()` on an `Err` value: LayoutError', ', ', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:266/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs::26667:
67note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:266:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:266:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.local-docker.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[52]:0x7992)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.staging.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[52]:0x7992)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/codegen.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[140]:0x2ce18)
           at <unnamed> (<module>[52]:0x78f0)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.staging.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[52]:0x7992)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.prod.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[52]:0x7992)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/codegen.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[140]:0x2ce18)
           at <unnamed> (<module>[52]:0x78f0)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)
failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.local-docker.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[52]:0x7992)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)
failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.prod.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[52]:0x7992)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)
thread 'thread '<unnamed><unnamed>' panicked at '' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:called `Result::unwrap()` on an `Err` value: LayoutError266', :67/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[52]:0x7992)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
thread 'thread 'failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[52]:0x7992)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)
:266:67
<unnamed>note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
' panicked at 'thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/use-graphql.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[140]:0x2ce18)
           at <unnamed> (<module>[52]:0x78f0)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/use-graphql.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[140]:0x2ce18)
           at <unnamed> (<module>[52]:0x78f0)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)
<unnamed>called `Result::unwrap()` on an `Err` value: LayoutError' panicked at '', called `Result::unwrap()` on an `Err` value: LayoutError/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:266:67', 
/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rsnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
:266:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/gql/fragment-masking.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[140]:0x2ce18)
           at <unnamed> (<module>[135]:0x2b551)
           at <unnamed> (<module>[119]:0x20654)
           at <unnamed> (<module>[117]:0x1cf1e)
           at <unnamed> (<module>[52]:0x7992)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/gql/gql.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[140]:0x2ce18)
           at <unnamed> (<module>[52]:0x78f0)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/gql/fragment-masking.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[140]:0x2ce18)
           at <unnamed> (<module>[135]:0x2b551)
           at <unnamed> (<module>[119]:0x20654)
           at <unnamed> (<module>[117]:0x1cf1e)
           at <unnamed> (<module>[52]:0x7992)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)
failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/gql/gql.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[140]:0x2ce18)
           at <unnamed> (<module>[52]:0x78f0)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:266:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/gql/graphql.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[52]:0x7992)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/gql/graphql.ts")'

Caused by:
    0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
    1: RuntimeError: unreachable
           at <unnamed> (<module>[707]:0x89c35)
           at <unnamed> (<module>[637]:0x8654f)
           at <unnamed> (<module>[713]:0x8a2b8)
           at <unnamed> (<module>[712]:0x8a1f1)
           at <unnamed> (<module>[480]:0x728f1)
           at <unnamed> (<module>[30]:0x266e)
           at <unnamed> (<module>[29]:0x2621)
           at <unnamed> (<module>[120]:0x20ceb)
           at <unnamed> (<module>[117]:0x1cf7b)
           at <unnamed> (<module>[52]:0x7992)
           at <unnamed> (<module>[411]:0x6c135)
           at <unnamed> (<module>[854]:0x9354d)
Error: Failed to compile:
data-layer/codegen.ts
data-layer/src/environments/environment.local-docker.ts
data-layer/src/environments/environment.prod.ts
data-layer/src/environments/environment.staging.ts
data-layer/src/environments/environment.ts
data-layer/src/lib/use-graphql.ts
data-layer/src/lib/gql/fragment-masking.ts
data-layer/src/lib/gql/gql.ts
data-layer/src/lib/gql/graphql.ts
    at initialCompilation (/home/soolid/code/e-socna-new-back/e-socna/node_modules/@swc/cli/lib/swc/dir.js:163:19)
    at async dir (/home/soolid/code/e-socna-new-back/e-socna/node_modules/@swc/cli/lib/swc/dir.js:228:5)

 >  NX   Command failed: npx swc data-layer -d ../dist/libs/data-layer --config-file=/home/soolid/code/e-socna-new-back/e-socna/libs/data-layer/.swcrc

   thread 'thread 'thread '<unnamed><unnamed><unnamed>' panicked at '' panicked at '' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutErrorcalled `Result::unwrap()` on an `Err` value: LayoutErrorcalled `Result::unwrap()` on an `Err` value: LayoutError', ', ', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:266/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs::26667:
   67note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:266:67
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:266:67
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.local-docker.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[52]:0x7992)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.staging.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[52]:0x7992)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
   thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/codegen.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[140]:0x2ce18)
              at <unnamed> (<module>[52]:0x78f0)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
   failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.staging.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[52]:0x7992)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)
   thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.prod.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[52]:0x7992)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
   failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/codegen.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[140]:0x2ce18)
              at <unnamed> (<module>[52]:0x78f0)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)
   failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.local-docker.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[52]:0x7992)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)
   failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.prod.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[52]:0x7992)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)
   thread 'thread '<unnamed><unnamed>' panicked at '' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:called `Result::unwrap()` on an `Err` value: LayoutError266', :67/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[52]:0x7992)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
   thread 'thread 'failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/environments/environment.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[52]:0x7992)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)
   :266:67
   <unnamed>note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   ' panicked at 'thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/use-graphql.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[140]:0x2ce18)
              at <unnamed> (<module>[52]:0x78f0)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
   failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/use-graphql.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[140]:0x2ce18)
              at <unnamed> (<module>[52]:0x78f0)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)
   <unnamed>called `Result::unwrap()` on an `Err` value: LayoutError' panicked at '', called `Result::unwrap()` on an `Err` value: LayoutError/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:266:67', 
   /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rsnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   :266:67
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/gql/fragment-masking.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[140]:0x2ce18)
              at <unnamed> (<module>[135]:0x2b551)
              at <unnamed> (<module>[119]:0x20654)
              at <unnamed> (<module>[117]:0x1cf1e)
              at <unnamed> (<module>[52]:0x7992)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
   thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/gql/gql.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[140]:0x2ce18)
              at <unnamed> (<module>[52]:0x78f0)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
   failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/gql/fragment-masking.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[140]:0x2ce18)
              at <unnamed> (<module>[135]:0x2b551)
              at <unnamed> (<module>[119]:0x20654)
              at <unnamed> (<module>[117]:0x1cf1e)
              at <unnamed> (<module>[52]:0x7992)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)
   failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/gql/gql.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[140]:0x2ce18)
              at <unnamed> (<module>[52]:0x78f0)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)
   thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.41/src/impls/core/mod.rs:266:67
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/gql/graphql.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[52]:0x7992)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.264.25/src/plugin.rs:162:14
   failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("data-layer/src/lib/gql/graphql.ts")'
   
   Caused by:
       0: failed to invoke `@graphql-codegen/client-preset-swc-plugin` as js transform plugin at @graphql-codegen/client-preset-swc-plugin
       1: RuntimeError: unreachable
              at <unnamed> (<module>[707]:0x89c35)
              at <unnamed> (<module>[637]:0x8654f)
              at <unnamed> (<module>[713]:0x8a2b8)
              at <unnamed> (<module>[712]:0x8a1f1)
              at <unnamed> (<module>[480]:0x728f1)
              at <unnamed> (<module>[30]:0x266e)
              at <unnamed> (<module>[29]:0x2621)
              at <unnamed> (<module>[120]:0x20ceb)
              at <unnamed> (<module>[117]:0x1cf7b)
              at <unnamed> (<module>[52]:0x7992)
              at <unnamed> (<module>[411]:0x6c135)
              at <unnamed> (<module>[854]:0x9354d)
   Error: Failed to compile:
   data-layer/codegen.ts
   data-layer/src/environments/environment.local-docker.ts
   data-layer/src/environments/environment.prod.ts
   data-layer/src/environments/environment.staging.ts
   data-layer/src/environments/environment.ts
   data-layer/src/lib/use-graphql.ts
   data-layer/src/lib/gql/fragment-masking.ts
   data-layer/src/lib/gql/gql.ts
   data-layer/src/lib/gql/graphql.ts
       at initialCompilation (/home/soolid/code/e-socna-new-back/e-socna/node_modules/@swc/cli/lib/swc/dir.js:163:19)
       at async dir (/home/soolid/code/e-socna-new-back/e-socna/node_modules/@swc/cli/lib/swc/dir.js:228:5)
   
   Pass --verbose to see the stacktrace.


 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Ran target build for project data-layer (4s)
 
    ✖    1/1 failed
    ✔    0/1 succeeded [0 read from cache]
 
   View structured, searchable error logs at https://nx.app/runs/9hIqgdMtfh


 *  The terminal process "/bin/bash '-c', 'npx nx run data-layer:build --configuration=development'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

socnacom avatar Jul 28 '23 15:07 socnacom

Same with vite

SPAHI4 avatar Aug 02 '23 18:08 SPAHI4

The problem is related to the outdated swc_core version (see https://swc.rs/docs/plugin/selecting-swc-core). It has to be recompiled (and possibly adjusted) to support the latest nextjs version. It still works up to nextjs version 13.4.2.

BowlingX avatar Aug 03 '23 13:08 BowlingX

@JesseVelden @YassinEldeeb @kamilkisiela any idea if this can be fixed at any point in the near future? I'm on [email protected], this plugin is currently unusable. Thanks for the great work here!

osdiab avatar Sep 11 '23 04:09 osdiab

Ah, I saw in this related issue that in fact there is a way to fix this today—but you need to compile your own version of the swc plugin:

https://github.com/dotansimha/graphql-code-generator/pull/9489#issuecomment-1672538560

So for anyone else who sees this issue, please read that comment!

osdiab avatar Sep 11 '23 04:09 osdiab

I'm using [email protected] but still unusable

2hakjoon avatar Oct 10 '23 06:10 2hakjoon

Not working with [email protected] as well

tilman avatar Oct 20 '23 16:10 tilman

Not working with [email protected]

niranjan94 avatar Oct 26 '23 17:10 niranjan94

Not working with 14.0.1

Daniel3711997 avatar Nov 01 '23 15:11 Daniel3711997

Can someone create an example on GitHub or CodeSandbox we could run and test with the latest versions?

Sorry but I'm not adding a lot here but just labeling it according to our new Contribution Guide and issue flow.

It seems already got into stage 0 and need a simple reproduction to move to stage 1.

Later to progress to stage 2, a failing test would be needed, we can also skip directly there is someone wants to take it on

Thank you and sorry that this comment is not a complete solution (yet).

Urigo avatar Nov 19 '23 14:11 Urigo

Hey, thanks for reporting! And sorry for the long delay. We are currently tracking the issue with SWC maintainers to figure out a solution.

Please add a 👍 to the issue and feel free to join the conversation. https://github.com/swc-project/swc/issues/8315

I'll keep you updated!

YassinEldeeb avatar Nov 20 '23 06:11 YassinEldeeb

Does anyone have an easy to follow write-up for how to get this to work while we wait for a permanent solution?

CaptainN avatar Jan 10 '24 18:01 CaptainN

Swinging back around - any progress?

CaptainN avatar May 22 '24 21:05 CaptainN

How about if we just don't generate a giant file to start with - I can manually edit the generated file so that it adds almost no overhead in the bundle: https://github.com/dotansimha/graphql-code-generator/issues/9988

CaptainN avatar Jun 05 '24 19:06 CaptainN

Same swc_core issue on nextjs version 14.2.3, looking at the swc discussion I don't think there will be a fix anytime soon.

Jordaneisenburger avatar Jul 31 '24 09:07 Jordaneisenburger