Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Tracked by #9489
huv1k opened this issue May 22, 2023 · 18 comments
Open
Tracked by #9489

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

huv1k opened this issue May 22, 2023 · 18 comments
Labels
stage/0-issue-prerequisites Needs more information before we can start working on it

Comments

@huv1k
Copy link

huv1k commented May 22, 2023

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

@RichiCoder1
Copy link

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

@YassinEldeeb YassinEldeeb mentioned this issue Jun 6, 2023
8 tasks
@johnoscott
Copy link

When will this be fixed ?

@RIP21
Copy link
Contributor

RIP21 commented Jul 19, 2023

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/@graphql-codegen+client-preset-swc-plugin@0.2.0/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm` as js transform plugin at /Users/rip21/Projects/core/node_modules/.pnpm/@graphql-codegen+client-preset-swc-plugin@0.2.0/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/@graphql-codegen+client-preset-swc-plugin@0.2.0/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm` as js transform plugin at /Users/rip21/Projects/core/node_modules/.pnpm/@graphql-codegen+client-preset-swc-plugin@0.2.0/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/@graphql-codegen+client-preset-swc-plugin@0.2.0/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm` as js transform plugin at /Users/rip21/Projects/core/node_modules/.pnpm/@graphql-codegen+client-preset-swc-plugin@0.2.0/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/@graphql-codegen+client-preset-swc-plugin@0.2.0/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm` as js transform plugin at /Users/rip21/Projects/core/node_modules/.pnpm/@graphql-codegen+client-preset-swc-plugin@0.2.0/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

@nandorojo
Copy link

Please specify the Next.js version where this breaks.

@socnacom
Copy link

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. 

@SPAHI4
Copy link

SPAHI4 commented Aug 2, 2023

Same with vite

@BowlingX
Copy link

BowlingX commented Aug 3, 2023

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.

victorandree added a commit to victorandree/graphql-code-generator that referenced this issue Aug 15, 2023
This allows the swc-plugin to work with Next.js v13.4.10, or later, as
documented on https://swc.rs/docs/plugin/selecting-swc-core.

As part of upgrading, we also set `lto = false` because of build
failures that have been popped up
(swc-project/swc#7479).

Closes: dotansimha#9450
@osdiab
Copy link

osdiab commented Sep 11, 2023

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

@osdiab
Copy link

osdiab commented Sep 11, 2023

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:

#9489 (comment)

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

victorandree added a commit to victorandree/graphql-code-generator that referenced this issue Sep 28, 2023
This allows the swc-plugin to work with Next.js v13.4.10, or later, as
documented on https://swc.rs/docs/plugin/selecting-swc-core.

As part of upgrading, we also set `lto = false` because of build
failures that have been popped up (swc-project/swc#7479).

Closes: dotansimha#9450
@2hakjoon
Copy link

I'm using next@13.5.2 but still unusable

@tilman
Copy link

tilman commented Oct 20, 2023

Not working with next@13.5.5 as well

@niranjan94
Copy link

Not working with next@13.5.6

@Daniel3711997
Copy link

Not working with 14.0.1

victorandree added a commit to victorandree/graphql-code-generator that referenced this issue Nov 16, 2023
This allows the swc-plugin to work with Next.js v13.4.10, or later, as
documented on https://swc.rs/docs/plugin/selecting-swc-core.

As part of upgrading, we also set `lto = false` because of build
failures that have been popped up (swc-project/swc#7479).

Closes: dotansimha#9450
@Urigo
Copy link
Collaborator

Urigo commented Nov 19, 2023

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).

@YassinEldeeb
Copy link
Collaborator

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.
swc-project/swc#8315

I'll keep you updated!

@CaptainN
Copy link

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

lucasfp13 added a commit to vtex/faststore that referenced this issue May 16, 2024
## What's the purpose of this pull request?

This PR intends to introduce `next/font` built-in feature to the project
(`app` directory).

The `babelrc.js` config file needed to be removed in favor of
`next/font` usage, [it's
mandatory](https://nextjs.org/docs/messages/babel-font-loader-conflict).
Next.js requires the use of its own compiler (SWC) config, so for now we
still don't have the necessary GraphQL Codegen plugin to replace the
`@graphql-codegen/client-preset` being loaded in the Babel config file,
as the existing one
([`@graphql-codegen/client-preset-swc-plugin`](https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#swc-plugin))
has a bug that hasn't been solved yet (see
[here](dotansimha/graphql-code-generator#9753)
and
[here](dotansimha/graphql-code-generator#9450).

Also, right now we are just introducing the feature, but we will have to
support local fonts and font override later in other tasks.

## How to test it?

- Run the local server (`yarn turbo run dev --filter=@faststore/core`);
- Make sure that all the current pages are working as expected (`/`,
`/office` and some `/<slug>/p`);
- Make sure `/fs-next-update` is rendering with some text on the top of
the page and without errors.

## References

- https://nextjs.org/blog/next-13#nextfont
-
https://nextjs.org/docs/app/api-reference/components/font#css-variables
- https://nextjs.org/docs/app/building-your-application/optimizing/fonts
@CaptainN
Copy link

Swinging back around - any progress?

@CaptainN
Copy link

CaptainN commented Jun 5, 2024

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: #9988

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/0-issue-prerequisites Needs more information before we can start working on it
Projects
None yet
Development

No branches or pull requests