Automatically transform your Next.js Pages to use SuperJSON with SWC

Overview

🔌 NEXT SUPERJSON PLUGIN

export default function Page({ date }) {
  return (
    <div>
      Today is {date.toDateString()}
    </div>
  )
}

// You can also use getInitialProps, getStaticProps
export const getServerSideProps = () => {
  return {
    props: {
      date: new Date()
    }
  }
}

SWC Plugin for Next.js (≥ v12.2.4)

This plugin allows the pre-rendering functions to return props including complex objects(Date, Map, Set..) that cannot be serialized by standard JSON.

👀 See how it works

Supported object types: Here

Usage

Install packages first:

npm install superjson next-superjson-plugin
# or Yarn
yarn add superjson next-superjson-plugin

Add the plugin into next.config.js

// next.config.js
module.exports = {
  experimental: {
    swcPlugins: [
      ['next-superjson-plugin', {}],
    ],
  },
}

Options

You can use the excluded option to exclude specific properties from serialization.

['next-superjson-plugin', { excluded: ["someProp"] }],

How it works

sequenceDiagram
    participant Next.js
    participant SWC Plugin
    participant SuperJSON
    Next.js-&gt;&gt;SWC Plugin: Request Transform
    SWC Plugin-&gt;&gt;SWC Plugin: Transform Pages &lt;br&gt; To Use SuperJSON
    SWC Plugin-&gt;&gt;Next.js: Take Pages
    Next.js--&gt;SuperJSON: Connected
    Next.js-&gt;&gt;SuperJSON: Serialize Props &lt;br&gt; (Date, BigInt, Set, Map..)
    Note over SWC Plugin: getInitialProps &lt;br&gt; getServerSideProps &lt;br&gt; getStaticProps
    SuperJSON-&gt;&gt;Next.js: Deserialize Props
    Note over SWC Plugin: Page Component
    

Contributing

Leave an issue

Special Thanks

  • kdy1 (Main creator of swc project)
Comments
  • Plugin breaks Sentry

    Plugin breaks Sentry

    Verify Next.js canary release

    • [X] I verified that the issue exists in the latest Next.js canary release

    Describe the bug

    When using next-supersjon-plugin alongside @sentry/nextjs with auto server instrumentation — which is now part of the default Sentry configuration for Next.js —, the app doesn't build anymore when running yarn build:

    info  - Collecting page data .Error: You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.
        at /Users/igassmann/Repositories/IGassmann/error-page-autoinstrumentation/node_modules/next/dist/build/utils.js:872:19
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
        at async Span.traceAsyncFn (/Users/igassmann/Repositories/IGassmann/error-page-autoinstrumentation/node_modules/next/dist/trace/trace.js:79:20)
    
    > Build error occurred
    Error: Failed to collect page data for /_error
        at /Users/igassmann/Repositories/IGassmann/error-page-autoinstrumentation/node_modules/next/dist/build/utils.js:916:15
        at processTicksAndRejections (node:internal/process/task_queues:96:5) {
      type: 'Error'
    }
    error Command failed with exit code 1.
    

    Expected behavior

    next-supersjon-plugin shouldn't break the build.

    Reproduction link

    https://github.com/IGassmann/error-page-autoinstrumentation

    Version

    0.4.2

    Config

    // This file sets a custom webpack configuration to use your Next.js app
    // with Sentry.
    // https://nextjs.org/docs/api-reference/next.config.js/introduction
    // https://docs.sentry.io/platforms/javascript/guides/nextjs/
    
    const { withSentryConfig } = require('@sentry/nextjs');
    
    const moduleExports = {
      experimental: {
        /**
         * Enable `superjson` experimental support for swc.
         */
        swcPlugins: [
          [
            "next-superjson-plugin", {},
          ],
        ],
      },
      reactStrictMode: true,
      swcMinify: true,
      sentry: {
        // Use `hidden-source-map` rather than `source-map` as the Webpack `devtool`
        // for client-side builds. (This will be the default starting in
        // `@sentry/nextjs` version 8.0.0.) See
        // https://webpack.js.org/configuration/devtool/ and
        // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map
        // for more information.
        hideSourceMaps: true,
        widenClientFileUpload: true,
        autoInstrumentServerFunctions: true,
    
        // Disable SentryWebpackPlugin so that the project can build without Sentry CLI token
        disableClientWebpackPlugin: true,
        disableServerWebpackPlugin: true,
      },
    };
    
    // Make sure adding Sentry options is the last code to run before exporting, to
    // ensure that your source maps include changes from all other Webpack plugins
    module.exports = withSentryConfig(moduleExports);
    

    Additional context

    The issue is also reported on Sentry Javascript repository: https://github.com/getsentry/sentry-javascript/issues/5904

    bug 
    opened by IGassmann 21
  • Build fails on Vercel sporadically

    Build fails on Vercel sporadically

    Describe the bug

    Next.js build fails on Vercel sporadically with many errors looking as such:

    thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/vercel/path0/pages/auth/login.tsx")'
    
    Caused by:
      0: Failed to create plugin instance
      1: missing requires CPU features: "EnumSet(AVX512DQ | AVX512VL | AVX512F)"', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.212.1/src/plugin.rs:222:14
    

    Expected behavior

    The build should always run successfully.

    Reproduction link

    No response

    Version

    0.4.0

    Config

    {
      experimental: {
        esmExternals: "loose",
        swcPlugins: [
          [
            "next-superjson-plugin",
            {
              excluded: [],
            },
          ],
        ],
      },
      webpack: (config, context) => {
        config.resolve.fallback = { fs: false }
    
        return config
      },
    }
    

    Additional context

    Next.js version: 12.2.5

    I believe this error happens when the host machine that is building the project on Vercel has a CPU that doesn’t have either of those features: AVX-512DQ, AVX-512VL, or AVX-512F. Since Vercel might use different host machines for each build, this would explain why it would fail sporadically.

    bug 
    opened by IGassmann 19
  • Next 13 support

    Next 13 support

    From what I can tell, this doesn't currently work with Next 13.

    I suspect this is because it is presently only active on the pages directory.

    Any chance of this being updated to support the Next 13 app directory as well?

    opened by Xexr 16
  • Issue with `next-superjson-plugin`

    Issue with `next-superjson-plugin`

    Here is my full stacktrace

    $ next dev
    ready - started server on 0.0.0.0:3000, url: http://localhost:3000
    info  - Loaded env from /Users/matteogauthier/dev/pollo/.env.local
    warn  - You have enabled experimental feature (swcPlugins) in next.config.js.
    warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
    
    thread 'thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.37/src/impls/core/mod.rs:<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.37/src/impls/core/mod.rs:265:67
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    265: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.37/src/impls/core/mod.rs:265:67
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    thread 'thread 'thread '<unnamed><unnamed>' panicked at '<unnamed>failed to invoke plugin: failed to invoke plugin on 'Some("/Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/dev/amp-dev.js")'
    
    Caused by:
        0: failed to invoke `/Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm` as js transform plugin at /Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm
        1: RuntimeError: unreachable
               at <unnamed> (<module>[1499]:0x1253cb)
               at <unnamed> (<module>[1492]:0x125123)
               at <unnamed> (<module>[1491]:0x1250a0)
               at <unnamed> (<module>[1477]:0x124301)
               at <unnamed> (<module>[1476]:0x124240)
               at <unnamed> (<module>[1486]:0x1249f0)
               at <unnamed> (<module>[1581]:0x12aff7)
               at <unnamed> (<module>[1628]:0x131d81)
               at <unnamed> (<module>[705]:0xc3c91)
               at <unnamed> (<module>[175]:0x2e345)
               at <unnamed> (<module>[728]:0xc603e)
               at <unnamed> (<module>[727]:0xc5dbb)
               at <unnamed> (<module>[575]:0xa3561)
               at <unnamed> (<module>[1692]:0x136a40)
        2: unreachable', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.226.26/src/plugin.rs:216:14' panicked at '
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    failed to invoke plugin: failed to invoke plugin on 'Some("/Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/next-dev.js")'
    
    Caused by:
        0: failed to invoke `/Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm` as js transform plugin at /Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm
        1: RuntimeError: unreachable
               at <unnamed> (<module>[1499]:0x1253cb)
               at <unnamed> (<module>[1492]:0x125123)
               at <unnamed> (<module>[1491]:0x1250a0)
               at <unnamed> (<module>[1477]:0x124301)
               at <unnamed> (<module>[1476]:0x124240)
               at <unnamed> (<module>[1486]:0x1249f0)
               at <unnamed> (<module>[1581]:0x12aff7)
               at <unnamed> (<module>[1628]:0x131d81)
               at <unnamed> (<module>[705]:0xc3c91)
               at <unnamed> (<module>[175]:0x2e345)
               at <unnamed> (<module>[728]:0xc603e)
               at <unnamed> (<module>[727]:0xc5dbb)
               at <unnamed> (<module>[575]:0xa3561)
               at <unnamed> (<module>[1692]:0x136a40)
        2: unreachable' panicked at '', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.226.26/src/plugin.rsfailed to invoke plugin: failed to invoke plugin on 'Some("/Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/router.js")'
    
    Caused by:
        0: failed to invoke `/Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm` as js transform plugin at /Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm
        1: RuntimeError: unreachable
               at <unnamed> (<module>[1499]:0x1253cb)
               at <unnamed> (<module>[1492]:0x125123)
               at <unnamed> (<module>[1491]:0x1250a0)
               at <unnamed> (<module>[1477]:0x124301)
               at <unnamed> (<module>[1476]:0x124240)
               at <unnamed> (<module>[1486]:0x1249f0)
               at <unnamed> (<module>[1581]:0x12aff7)
               at <unnamed> (<module>[1628]:0x131d81)
               at <unnamed> (<module>[440]:0x845e6)
               at <unnamed> (<module>[440]:0x829fb)
               at <unnamed> (<module>[219]:0x466ad)
               at <unnamed> (<module>[175]:0x2eef9)
               at <unnamed> (<module>[728]:0xc603e)
               at <unnamed> (<module>[727]:0xc5dbb)
               at <unnamed> (<module>[575]:0xa3561)
               at <unnamed> (<module>[1692]:0x136a40)
        2: unreachable:', 216/Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.226.26/src/plugin.rs::14216
    :14
    thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/matteogauthier/dev/pollo/pages/_app.tsx")'
    
    Caused by:
        0: failed to invoke `/Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm` as js transform plugin at /Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm
        1: RuntimeError: out of bounds memory access
               at <unnamed> (<module>[440]:0x8294a)
               at <unnamed> (<module>[219]:0x466ad)
               at <unnamed> (<module>[175]:0x2eef9)
               at <unnamed> (<module>[728]:0xc603e)
               at <unnamed> (<module>[727]:0xc5dbb)
               at <unnamed> (<module>[575]:0xa3561)
               at <unnamed> (<module>[1692]:0x136a40)
        2: heap_get_oob', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.226.26/src/plugin.rs:216:14
    thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/pages/_error.js")'
    
    Caused by:
        0: failed to invoke `/Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm` as js transform plugin at /Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm
        1: RuntimeError: out of bounds memory access
               at <unnamed> (<module>[1539]:0x129034)
               at <unnamed> (<module>[518]:0x965de)
               at <unnamed> (<module>[175]:0x2e257)
               at <unnamed> (<module>[728]:0xc603e)
               at <unnamed> (<module>[727]:0xc5dbb)
               at <unnamed> (<module>[575]:0xa3561)
               at <unnamed> (<module>[1692]:0x136a40)
        2: heap_get_oob', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.226.26/src/plugin.rs:216:14
    thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/matteogauthier/dev/pollo/pages/_app.tsx")'
    
    Caused by:
        0: failed to invoke `/Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm` as js transform plugin at /Users/matteogauthier/dev/pollo/node_modules/.pnpm/[email protected]_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm
        1: RuntimeError: out of bounds memory access
               at <unnamed> (<module>[282]:0x4edf8)
               at <unnamed> (<module>[175]:0x2e295)
               at <unnamed> (<module>[728]:0xc603e)
               at <unnamed> (<module>[727]:0xc5dbb)
               at <unnamed> (<module>[575]:0xa3561)
               at <unnamed> (<module>[1692]:0x136a40)
        2: heap_get_oob', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.226.26/src/plugin.rs:216:14
    error Command failed with signal "SIGSEGV".
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    

    And my next info

        Operating System:
          Platform: darwin
          Arch: x64
          Version: Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000
        Binaries:
          Node: 17.4.0
          npm: 8.3.1
          Yarn: 1.22.17
          pnpm: 7.5.1
        Relevant packages:
          next: 12.3.1
          eslint-config-next: 13.0.0
          react: 18.2.0
          react-dom: 18.2.0
    
    opened by MatteoGauthier 10
  • Missing export __get_transform_plugin_core_pkg_diag

    Missing export __get_transform_plugin_core_pkg_diag

    Describe the bug

    When enabling the plugin the terminal returns:

    thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/.../node_modules/next/dist/client/next-dev.js")'
    
    Caused by:
        Missing export __get_transform_plugin_core_pkg_diag', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.224.0/src/plugin.rs:216: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("/Users/.../node_modules/next/dist/client/dev/amp-dev.js")'
    
    Caused by:
        Missing export __get_transform_plugin_core_pkg_diag', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.224.0/src/plugin.rs:216:14
    thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/.../node_modules/next/dist/client/router.js")'
    
    Caused by:
        Missing export __get_transform_plugin_core_pkg_diag', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.224.0/src/plugin.rs:216:14
    thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/.../src/pages/_app.tsx")'
    
    Caused by:
        Missing export __get_transform_plugin_core_pkg_diag', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.224.0/src/plugin.rs:216:14
    thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/.../node_modules/next/dist/pages/_error.js")'
    
    Caused by:
        Missing export __get_transform_plugin_core_pkg_diag', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.224.0/src/plugin.rs:216:14
    thread 'thread '<unnamed>' panicked at '<unnamed>failed to invoke plugin: failed to invoke plugin on 'Some("/Users/.../src/pages/_app.tsx")'
    
    Caused by:
        Missing export __get_transform_plugin_core_pkg_diag' panicked at '', failed to invoke plugin: failed to invoke plugin on 'Some("/Users/.../src/pages/_document.tsx")'
    
    Caused by:
        Missing export __get_transform_plugin_core_pkg_diag/Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.224.0/src/plugin.rs', :/Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.224.0/src/plugin.rs:216216::1414
    
    thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/.../node_modules/next/dist/pages/_error.js")'
    
    Caused by:
        Missing export __get_transform_plugin_core_pkg_diag', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.224.0/src/plugin.rs:216:14
    error - ./node_modules/next/dist/client/dev/amp-dev.js
    Error: failed to process failed to invoke plugin: failed to invoke plugin on 'Some("/Users/.../node_modules/next/dist/client/dev/amp-dev.js")'
    
    Caused by:
        Missing export __get_transform_plugin_core_pkg_diag
    

    Expected behavior

    Not throw error

    Reproduction link

    No response

    Version

    0.4.1

    Config

    /**
     * @type {import('next').NextConfig}
     */
    const nextConfig = {
      experimental: {
        swcPlugins: [['next-superjson-plugin', {}]],
      },
    };
    
    module.exports = nextConfig;
    

    Additional context

    Next 12.3.0

    bug 
    opened by cellulosa 6
  • Error serializing with getStaticPaths

    Error serializing with getStaticPaths

    Hi @orionmiz and Thanks for make king-wang-zzang (very wonderful) package :) However, When I getStaticPaths with NextJS 12.2.4, It's throws SerializableError It came from looks like not serializing

    Is that expected behavior? And Can you know how to fix it? Thank you :)

    opened by KimPinot 6
  • Rust error

    Rust error

    Verify Next.js canary release

    • [X] I verified that the issue exists in the latest Next.js canary release

    Describe the bug

    I get this output

    gymrat/apps/next on  main ❯ RUST_BACKTRACE=1 pnpm run dev
    
    > [email protected] dev /Users/jokull/Code/gymrat/apps/next
    > next dev --port 3800
    
    ready - started server on 0.0.0.0:3800, url: http://localhost:3800
    info  - Loaded env from /Users/jokull/Code/gymrat/apps/next/.env
    warn  - You have enabled experimental features (appDir, allowMiddlewareResponseBody, swcPlugins) in next.config.js.
    warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
    info  - Thank you for testing `appDir` please leave your feedback at https://nextjs.link/app-feedback
    
    thread 'thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/lib.rs:43:48
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/lib.rs:43:48
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/lib.rs:43:48
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    <unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/lib.rs:43:48
    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/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/router.js")'
    
    Caused by:
        0: failed to invoke `/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at /Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm
        1: RuntimeError: unreachable
        2: unreachable
    
    Stack backtrace:
       0: _wasmer_vm_raise_trap
       1: _wasmer_vm_raise_trap
       2: _napi_register_module_v1
       3: <unknown>
       4: <unknown>
       5: <unknown>
       6: <unknown>
       7: <unknown>
       8: <unknown>
       9: <unknown>
      10: <unknown>
      11: <unknown>
      12: <unknown>
      13: <unknown>
      14: <unknown>', /Users/runner/.cargo/registry/src/github.com-1eccthread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/next-dev.js")'
    
    Caused by:
        0: failed to invoke `/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at /Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm
        1: RuntimeError: unreachable
        2: unreachable
    
    Stack backtrace:
       0: _wasmer_vm_raise_trap
       1: _wasmer_vm_raise_trap
       2: _napi_register_module_v1
       3: <unknown>
       4: <unknown>
       5: <unknown>
       6: <unknown>
       7: <unknown>
       8: <unknown>
       9: <unknown>
      10: <unknown>
      11: <unknown>
      12: <unknown>
      13: <unknown>
      14: <unknown>', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.232.84/src/plugin.rs6299db9ec823/swc-0.232.84/src/plugin.rs::228228::1414
    
    stack backtrace:
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    stack backtrace:
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/app-next-dev.js")'
    
    Caused by:
        0: failed to invoke `/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at /Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm
        1: RuntimeError: unreachable
        2: unreachable
    
    Stack backtrace:
       0: _wasmer_vm_raise_trap
       1: _wasmer_vm_raise_trap
       2: _napi_register_module_v1
       3: <unknown>
       4: <unknown>
       5: <unknown>
       6: <unknown>
       7: <unknown>
       8: <unknown>
       9: <unknown>
      10: <unknown>
      11: <unknown>
      12: <unknown>
      13: <unknown>
      14: <unknown>', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.232.84/src/plugin.rs:228:14
    thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/dev/amp-dev.js")'
    
    Caused by:
        0: failed to invoke `/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at /Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm
        1: RuntimeError: unreachable
        2: unreachable
    
    Stack backtrace:
       0: _wasmer_vm_raise_trap
       1: _wasmer_vm_raise_trap
       2: _napi_register_module_v1
       3: <unknown>
       4: <unknown>
       5: <unknown>
       6: <unknown>
       7: <unknown>
       8: <unknown>
       9: <unknown>
      10: <unknown>
      11: <unknown>
      12: <unknown>
      13: <unknown>
      14: <unknown>', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.232.84/src/plugin.rs:228:14
    stack backtrace:
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    stack backtrace:
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/lib.rs:43:48
    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/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/pages/_app.js")'
    
    Caused by:
        0: failed to invoke `/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at /Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm
        1: RuntimeError: unreachable
        2: unreachable
    
    Stack backtrace:
       0: _wasmer_vm_raise_trap
       1: _wasmer_vm_raise_trap
       2: _napi_register_module_v1
       3: <unknown>
       4: <unknown>
       5: <unknown>
       6: <unknown>
       7: <unknown>
       8: <unknown>
       9: <unknown>
      10: <unknown>
      11: <unknown>
      12: <unknown>
      13: <unknown>
      14: <unknown>', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.232.84/src/plugin.rs:228:14
    stack backtrace:
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/lib.rs:43:48
    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/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/pages/_error.js")'
    
    Caused by:
        0: failed to invoke `/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at /Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm
        1: RuntimeError: unreachable
        2: unreachable
    
    Stack backtrace:
       0: _wasmer_vm_raise_trap
       1: _wasmer_vm_raise_trap
       2: _napi_register_module_v1
       3: <unknown>
       4: <unknown>
       5: <unknown>
       6: <unknown>
       7: <unknown>
       8: <unknown>
       9: <unknown>
      10: <unknown>
      11: <unknown>
      12: <unknown>
      13: <unknown>
      14: <unknown>', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.232.84/src/plugin.rs:228:14
    stack backtrace:
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/lib.rs:43:48
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/lib.rs:43:48
    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/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/pages/_app.js")'
    
    Caused by:
        0: failed to invoke `/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at /Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm
        1: RuntimeError: unreachable
        2: unreachable
    
    Stack backtrace:
       0: _wasmer_vm_raise_trap
       1: _wasmer_vm_raise_trap
       2: _napi_register_module_v1
       3: <unknown>
       4: <unknown>
       5: <unknown>
       6: <unknown>
       7: <unknown>
       8: <unknown>
       9: <unknown>
      10: <unknown>
      11: <unknown>
      12: <unknown>
      13: <unknown>
      14: <unknown>', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.232.84/src/plugin.rs:228:14
    thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/pages/_error.js")'
    
    Caused by:
        0: failed to invoke `/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at /Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm
        1: RuntimeError: unreachable
        2: unreachable
    
    Stack backtrace:
       0: _wasmer_vm_raise_trap
       1: _wasmer_vm_raise_trap
       2: _napi_register_module_v1
       3: <unknown>
       4: <unknown>
       5: <unknown>
       6: <unknown>
       7: <unknown>
       8: <unknown>
       9: <unknown>
      10: <unknown>
      11: <unknown>
      12: <unknown>
      13: <unknown>
      14: <unknown>', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.232.84/src/plugin.rs:228:14
    stack backtrace:
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    stack backtrace:
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/lib.rs:43:48
    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/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/pages/_document.js")'
    
    Caused by:
        0: failed to invoke `/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at /Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm
        1: RuntimeError: unreachable
        2: unreachable
    
    Stack backtrace:
       0: _wasmer_vm_raise_trap
       1: _wasmer_vm_raise_trap
       2: _napi_register_module_v1
       3: <unknown>
       4: <unknown>
       5: <unknown>
       6: <unknown>
       7: <unknown>
       8: <unknown>
       9: <unknown>
      10: <unknown>
      11: <unknown>
      12: <unknown>
      13: <unknown>
      14: <unknown>', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.232.84/src/plugin.rs:228:14
    stack backtrace:
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    error - ../../node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/app-next-dev.js
    Error: failed to process failed to invoke plugin: failed to invoke plugin on 'Some("/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/app-next-dev.js")'
    
    Caused by:
        0: failed to invoke `/Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at /Users/jokull/Code/gymrat/node_modules/.pnpm/[email protected]_f6u5o4wezvqlz2l4c6obuika34/node_modules/next-superjson-plugin/dist/next_superjson.wasm
        1: RuntimeError: unreachable
        2: unreachable
    
    Stack backtrace:
       0: _wasmer_vm_raise_trap
       1: _wasmer_vm_raise_trap
       2: _napi_register_module_v1
       3: <unknown>
       4: <unknown>
       5: <unknown>
       6: <unknown>
       7: <unknown>
       8: <unknown>
       9: <unknown>
      10: <unknown>
      11: <unknown>
      12: <unknown>
      13: <unknown>
      14: <unknown>
    
    Stack backtrace:
       0: _wasmer_vm_raise_trap
       1: _wasmer_vm_raise_trap
       2: <unknown>
       3: <unknown>
       4: <unknown>
    ^C⏎     
    

    Expected behavior

    N/A

    Reproduction link

    No response

    Version

    0.5.0

    Config

    /** @type {import('next').NextConfig} */
    const nextConfig = {
      experimental: {
        appDir: true,
        // runtime: "experimental-edge",
        transpilePackages: ["api"],
        allowMiddlewareResponseBody: true,
        swcPlugins: [["next-superjson-plugin", {}]],
      },
    };
    
    module.exports = nextConfig;
    

    Additional context

    PNPM monorepo. If something doesn't jump out as obvious I will help recreate in a small repo.

    bug 
    opened by jokull 5
  • Failed to build after installing next-superjson-plugin

    Failed to build after installing next-superjson-plugin

    Describe the bug

    Hi Guys,

    First of all thanks for this plugin. It will be really useful. But after installing the plugin and configure i couldn't launch the project with yarn dev. See below the output from yarn dev

    warn - You have enabled experimental feature (swcPlugins) in next.config.js. warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.

    thread 'thread 'thread '' panicked at '' panicked at 'failed to invoke plugin: failed to invoke C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm' panicked at 'failed to invoke plugin: failed to invoke C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node-plugin\next_superjson.wasmgin\next_superjson.wasm Caused by:invoke plugin: failed to invoke C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_mod 0: Failed to create plugin instanceon.wasm as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjsonCaused by: 1: Error while importing "env"."__get_transform_plugin_config": unknown import. Expected Function(FunctionType { params: [I32], results: [I32] }) 0: Failed to create plugin instance', 0: Failed to create plugin instanceC:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.188 1: Error while importing "env"."__get_transform_plugin_config": unknown import. Expected Function(FunctionType { params: [I32], results: [I32] }) 1: Error while importing "env"."__get_transform_plugin_config": unknown import. Expected Function(FunctionType { params: [I32], results: [I32] }):t', hread '', 212C:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.188.0\src\plugin.rsC:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.188.0\src\plugin.rs:' panicked at '::21214212failed to invoke plugin: failed to invoke C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_n14t\node_modules\next-superjson-plugin\next_superjson.wasm as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm : : note: run with RUST_BACKTRACE=1 environment variable to display a backtraceCaused by: 0: Failed to create plugin instance 1: Error while importing "env"."__get_transform_plugin_config": unknown import. Expected Function(FunctionType { params: [I32], results: [I32] })14', C:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.188.0\src\plugin.rs:212:14 thread '' panicked at 'failed to invoke plugin: failed to invoke C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm

    Caused by: 0: Failed to create plugin instance 1: Error while importing "env"."__get_transform_plugin_config": unknown import. Expected Function(FunctionType { params: [I32], results: [I32] })', C:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.188.0\src\plugin.rs:212:14 thread 'thread '' panicked at '' panicked at 'failed to invoke plugin: failed to invoke C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasmfailed to invoke plugin: failed to invoke C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm

    Caused by:Caused by: 0: Failed to create plugin instance 0: Failed to create plugin instancethread ' ' panicked at '', 1: Error while importing "env"."__get_transform_plugin_config": unknown import. Expected Function(FunctionType { params: [I32], results: [I32] })failed to invoke plugin: failed to invoke C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasmC:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.188.0\src\plugin.rs :Caused by:C:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.188.0\src\plugin.rs 212 0: Failed to create plugin instance:: 14212 1: Error while importing "env"."__get_transform_plugin_config": unknown import. Expected Function(FunctionType { params: [I32], results: [I32] }) :', 14C:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.188.0\src\plugin.rs :212:14 error - ./node_modules/next/dist/client/dev/amp-dev.js Error: failed to process failed to invoke plugin: failed to invoke C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm as js transform plugin at C:\Users\Hugens\Desktop\Ongoing_project\next\allodoc_next\node_modules\next-superjson-plugin\next_superjson.wasm

    Caused by: 0: Failed to create plugin instance 1: Error while importing "env"."__get_transform_plugin_config": unknown import. Expected Function(FunctionType { params: [I32], results: [I32] })

    Expected behavior

    yarn dev should launch the project properly.

    Reproduction link

    No response

    Version

    0.2.0

    Config

    /** @type {import('next').NextConfig} */
    const nextConfig = {
      reactStrictMode: true,
      // swcMinify: true,
      experimental: {
        swcPlugins: [
          [
            'next-superjson-plugin',
            {
              excluded: [],
            },
          ],
        ],
      },
    }
    
    module.exports = nextConfig
    

    Additional context

    No response

    bug 
    opened by louishugens 4
  • _app.tsx not getting parsed data

    _app.tsx not getting parsed data

    Verify Next.js canary release

    • [X] I verified that the issue exists in the latest Next.js canary release

    Describe the bug

    I'm using getServerSideProps to fetch some data and return it in props and in the _app.tsx file I want to use that data. The problem is, I have a few bigint properties in the data but in the _app.tsx file bigint are still strings. I checked on the page itself and the data are parsed as expected bigint are bigint.

    Expected behavior

    parsed the data.

    Reproduction link

    No response

    Version

    0.4.9

    Config

    experimental: {
          swcPlugins: [
            [
              "next-superjson-plugin",
              {
                excluded: [],
              },
            ],
          ],
        },
    

    Additional context

    next: v12.3.2-canary.43

    bug 
    opened by tzelon-cypator 3
  • thread '<unnamed>' panicked at 'failed to invoke plugin

    thread '' panicked at 'failed to invoke plugin

    Hello, I have migrated to Ubuntu OS and I'm getting bellow error.

    thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/media/.../node_modules/next/dist/client/dev/amp-dev.js")'
    
    Caused by:
        0: failed to invoke `/media/.../node_modules/next-superjson-plugin/next_superjson.wasm` as js transform plugin at /media/.../node_modules/next-superjson-plugin/next_superjson.wasm
        1: RuntimeError: out of bounds memory access
               at <unnamed> (<module>[329]:0x62a25)
               at <unnamed> (<module>[355]:0x6bd6b)
               at <unnamed> (<module>[357]:0x6d15e)
               at <unnamed> (<module>[41]:0xc3fb)
               at <unnamed> (<module>[105]:0x1cf8d)
               at <unnamed> (<module>[158]:0x343b0)
               at <unnamed> (<module>[183]:0x3c8ce)
               at <unnamed> (<module>[124]:0x2332b)
               at <unnamed> (<module>[751]:0xd2250)
               at <unnamed> (<module>[750]:0xd1fe1)
               at <unnamed> (<module>[589]:0xaf798)
        2: heap_get_oob', /usr/local/cargo/registry/src/github.com-.../src/plugin.rs:216:14
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    error Command failed with exit code 1.
    
    need more info 
    opened by merthanmerter 3
  • unable to resolve dependency tree

    unable to resolve dependency tree

    Describe the bug

    Yo updated my package.json with "next-superjson-plugin": "^0.4.2", (and "next": "^12.3.0",). This is what I get:

    npm install
    npm ERR! code ERESOLVE
    npm ERR! ERESOLVE unable to resolve dependency tree
    npm ERR! 
    npm ERR! While resolving: [email protected]
    npm ERR! Found: [email protected]
    npm ERR! node_modules/next
    npm ERR!   next@"^12.3.0" from the root project
    npm ERR! 
    npm ERR! Could not resolve dependency:
    npm ERR! peer next@">12.3.0" from [email protected]
    npm ERR! node_modules/next-superjson-plugin
    npm ERR!   next-superjson-plugin@"^0.4.2" from the root project
    npm ERR! 
    npm ERR! Fix the upstream dependency conflict, or retry
    npm ERR! this command with --force, or --legacy-peer-deps
    npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
    

    --force does not help. Am I missing something?

    Expected behavior

    to install next-superjson-plugin 0.4.2 with the canary version of next (12.3.0).

    Reproduction link

    No response

    Version

    0.4.2

    Config

    No response

    Additional context

    No response

    bug 
    opened by cellulosa 3
Releases(v0.5.3)
  • v0.5.3(Jan 3, 2023)

    What's Changed

    • chore: add preferUnplugged field in package.json by @tonyfromundefined in https://github.com/blitz-js/next-superjson-plugin/pull/61

    New Contributors

    • @tonyfromundefined made their first contribution in https://github.com/blitz-js/next-superjson-plugin/pull/61

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.5.2...v0.5.3

    Source code(tar.gz)
    Source code(zip)
  • v0.5.2(Dec 5, 2022)

    What's Changed

    • Ignore path more aggressively by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/60

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.5.1...v0.5.2

    Source code(tar.gz)
    Source code(zip)
  • v0.5.1(Dec 5, 2022)

    What's Changed

    • Trace unhandled path by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/59

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.5.0...v0.5.1

    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Dec 4, 2022)

    What's Changed

    • Add kodiak app by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/49
    • Update compatible version of next.js by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/51
    • Add prettier config file by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/52
    • Configure auto formatting system by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/53
    • Support client component interop by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/57

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.4.9...v0.5.0

    Source code(tar.gz)
    Source code(zip)
  • v0.4.9(Nov 5, 2022)

    What's Changed

    • Correct saving positions of exports by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/48

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.4.8...v0.4.9

    Source code(tar.gz)
    Source code(zip)
  • v0.4.8(Oct 17, 2022)

    What's Changed

    • Update swc by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/45

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.4.7...v0.4.8

    Source code(tar.gz)
    Source code(zip)
  • v0.4.7(Oct 15, 2022)

    What's Changed

    • Update swc by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/43
    • Keep getInitialProps while cheking its usage by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/44

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.4.6...v0.4.7

    Source code(tar.gz)
    Source code(zip)
  • v0.4.6(Oct 15, 2022)

    What's Changed

    • Consider case when getInitialProps comes first by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/42

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.4.5...v0.4.6

    Source code(tar.gz)
    Source code(zip)
  • v0.4.5(Oct 14, 2022)

    What's Changed

    • Change compiler target to wasm32-wasi by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/40
    • Bypass multiple exports by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/41

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.4.4...v0.4.5

    Source code(tar.gz)
    Source code(zip)
  • v0.4.4(Oct 13, 2022)

    What's Changed

    • Disable redundant workflows by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/38
    • Check delivering undefined props by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/39

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.4.3...v0.4.4

    Source code(tar.gz)
    Source code(zip)
  • v0.4.3(Oct 12, 2022)

    What's Changed

    • Use relaxed simd feature by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/36
    • Update publishing alias by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/37

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.4.2...v0.4.3

    Source code(tar.gz)
    Source code(zip)
  • v0.4.2(Sep 16, 2022)

    What's Changed

    • Correct keyword triggering workflow by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/27
    • Update swc by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/29
    • Update compatible version of next.js by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/30

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.4.1...v0.4.2

    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(Sep 9, 2022)

    What's Changed

    • Enclose tag keyword in quote by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/24
    • Change compiler target to wasm32-unknown-unknown by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/26

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.4.0...v0.4.1

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Aug 31, 2022)

    What's Changed

    • Unify ident symbols into common variables by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/12
    • Bind props positions in struct by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/13
    • Fill missing specifier for importing page by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/15
    • Reduce duplicate codes by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/14
    • Provide default plugin config by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/16
    • Initialize position holders to default values by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/17
    • Refactor transformter struct by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/19
    • Support transforming getInitialProps by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/20
    • Push page module item later by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/21
    • Update README.md by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/22
    • Fix typo by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/23

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/compare/v0.3.0...v0.4.0

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Aug 16, 2022)

    What's Changed

    • Reduce binary size by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/3
    • Use tag instead of branch on publish by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/4
    • Update urls of project by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/5
    • Add issue template about bug report by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/6
    • Run test workflows only on specific paths by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/8
    • Transform only page files by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/9
    • Fix triggering keyword of tags by @orionmiz in https://github.com/blitz-js/next-superjson-plugin/pull/10

    New Contributors

    • @orionmiz made their first contribution in https://github.com/blitz-js/next-superjson-plugin/pull/3

    Full Changelog: https://github.com/blitz-js/next-superjson-plugin/commits/v0.3.0

    Source code(tar.gz)
    Source code(zip)
Owner
⚡️Blitz
⚡️Blitz
A swc plugin that automatically converts React component libraries into "React Client Component"

A swc plugin that automatically converts React component libraries into "React Client Component". For example, you can automatically convert components from @mui into "React Client Component" without having to wrap a component that uses "use client".

xiaotian 3 Jul 12, 2023
swc node binding use wasm

node_swc swc node binding use wasm Build Make sure you have rust wasm-pack installed. $ yarn build # build wasm, node Usage import { parseSync, printS

伊撒尔 23 Sep 8, 2022
[SWC plugin] workaround for jest

[SWC plugin] workaround for jest This is a SWC plugin to handle jest compatibility issues. This SWC plugin should be used with @swc/jest. usage instal

magic-akari 17 Dec 19, 2022
An experimental transpiler to bring tailwind macros to SWC 🚀

stailwc (speedy tailwind compiler) This is an experimental SWC transpiler to bring compile time tailwind macros to SWC (and nextjs) a-la twin macro. T

Alexander Lyon 139 Dec 20, 2022
A formal, politely verbose programming language for building next-gen reliable applications

vfpl Pronounced "Veepl", the f is silent A politely verbose programming language for building next-gen reliable applications Syntax please initialize

VFPL 4 Jun 27, 2022
Peekable iterator that allows to peek the next N elements without consuming them.

peekaboo docs - crates.io Peekable iterator that allows to peek the next N elements without consuming them. It's no_std compatible by default. It also

annie 6 Nov 27, 2022
Crate of GitHub’s collection of gitignores, embedded, automatically updated

Gitignores GitHub’s collection of gitignores, embedded, automatically updated. API documentation. Public Domain via CC0-1.0 (same as source data). MSR

null 3 May 3, 2022
A git hook to manage derivative files automatically.

git-derivative A git hook to manage derivative files automatically. For example if you checked out to a branch with different yarn.lock, git-derivativ

Sung Jeon 3 Oct 30, 2022
Automatically build a Rust module tree from the project directory structure

Hypermod An even lazier version of automod and supermod. Searches the src/ directory recursively for .rs files, then builds a module tree using the di

null 4 Aug 3, 2022
Automatically cross-compiles the sysroot crates core, compiler_builtins, and alloc.

cargo-xbuild Cargo-xbuild is a wrapper for cargo build, which cross compiles the sysroot crates core, compiler_builtins, and alloc for custom targets.

Rust OSDev 241 Dec 30, 2022
A CLI tool that automatically writes commit messages for you.

Automagically-generated commit messages A CLI tool that generates commit messages from your staged changes, built in Rust and using OpenAI's Codex. In

Miguel Piedrafita 839 Jan 6, 2023
Czkawka is a simple, fast and easy to use app to remove unnecessary files from your computer.

Multi functional app to find duplicates, empty folders, similar images etc.

Rafał Mikrut 9.2k Jan 4, 2023
A Rust framework to develop and use plugins within your project, without worrying about the low-level details.

VPlugin: A plugin framework for Rust. Website | Issues | Documentation VPlugin is a Rust framework to develop and use plugins on applications and libr

VPlugin 11 Dec 31, 2022
Twidge is a fresh approach to productivity. It integrates with your workflow and allows you to be your most productive self.

Twidge A productivity app which is an extension to your mind Twidge is a cross platform productivity app, powered by rust, tauri, prisma-client-rust T

Twidge 187 Jun 28, 2023
bevy_blender is a Bevy library that allows you to use assets created in Blender directly from the .blend file

bevy_blender bevy_blender is a Bevy library that allows you to use assets created in Blender directly from the .blend file.

Jerald Thomas 45 Jan 4, 2023
Use enum to filter something, support | and & operator.

Filter Use enum to filter something, support | and & operator. Just need to implement Filter Trait with filter-macros crate. How to work Example #[add

上铺小哥 9 Feb 8, 2022
Ed25519 suitable for use in consensus-critical contexts.

Ed25519 for consensus-critical contexts This library provides an Ed25519 implementation with validation rules intended for consensus-critical contexts

Penumbra 33 Dec 29, 2022
Easy to use Rust i18n library based on code generation

rosetta-i18n rosetta-i18n is an easy-to-use and opinionated Rust internationalization (i18n) library powered by code generation. rosetta_i18n::include

null 38 Dec 18, 2022
Proof of Concept / Experiment: Use IDF-HAL-LL from bare metal Rust

Proof of Concept / Experiment: Use IDF-HAL-LL from BM Rust idf-ll-compile pre-compiles a static library for ESP32C3 and ESP32 esp-ll a simple crate th

Björn Quentin 0 Aug 11, 2022