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

Next 14 doesn't work #114

Open
1 task done
najibghadri opened this issue Nov 24, 2024 · 0 comments
Open
1 task done

Next 14 doesn't work #114

najibghadri opened this issue Nov 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@najibghadri
Copy link

Verify Next.js canary release

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

Describe the bug

I'm just tryna use the plugin the way you described.

"next-superjson-plugin": "0.5.10", or  "^0.6.3",
"next": "^14.1.1", and     "next": "^14.2.8",
"superjson": "^1.13.3",

Tried other versions too, nothing worked... Also tried next 13. Is this superjson solution deprecated for next.js? Should I just use JSON.serialize/parse?

Getting a bunch of this:

thread 'thread '<unnamed><unnamed>' panicked at '' panicked at 'Failed to parse plugin config: Error("unknown field `debug`, expected `excluded`", line: 1, column: 8)Failed to parse plugin config: Error("unknown field `debug`, expected `excluded`", line: 1, column: 8)', ', src/lib.rssrc/lib.rs::8181::1010

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.270.18/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/ghadrinajib/Documents/GitHub/autoparts-app/src/pages/search.tsx")'

Caused by:
    0: failed to invoke `/Users/ghadrinajib/Documents/GitHub/autoparts-app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at /Users/ghadrinajib/Documents/GitHub/autoparts-app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next-superjson-plugin/dist/next_superjson.wasm
    1: RuntimeError: unreachable
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.270.18/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/ghadrinajib/Documents/GitHub/autoparts-app/src/pages/_app.tsx")'

Caused by:
    0: failed to invoke `/Users/ghadrinajib/Documents/GitHub/autoparts-app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at /Users/ghadrinajib/Documents/GitHub/autoparts-app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next-superjson-plugin/dist/next_superjson.wasm
    1: RuntimeError: unreachable
 ○ Compiling /search ...
thread '<unnamed>' panicked at 'Failed to parse plugin config: Error("unknown field `debug`, expected `excluded`", line: 1, column: 8)', src/lib.rs:81:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at /Users/geist/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.270.18/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/ghadrinajib/Documents/GitHub/autoparts-app/src/pages/_app.tsx")'

Expected behavior

Should work.

Reproduction link

No response

Version

0.6.3

Config

/**
 * Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
 * for Docker builds.
 */
await import('./src/env.mjs');

/** @type {import("next").NextConfig} */
const config = {
  reactStrictMode: true,

  sassOptions: {
    prependData: '@import "./_mantine.scss";',
  },

  // TODO: failing
  experimental: {
    swcPlugins: [['next-superjson-plugin', { debug: true }]],
  },

  /**
   * If you have `experimental: { appDir: true }` set, then you must comment the below `i18n` config
   * out.
   *
   * @see https://github.com/vercel/next.js/issues/41980
   */
  i18n: {
    locales: ['en'],
    defaultLocale: 'en',
  },

  // eslint-disable-next-line @typescript-eslint/require-await
  async redirects() {
    return [
      {
        source: '/seller',
        destination: '/seller/inventory',
        permanent: true,
      },
    ];
  },
};
export default config;

Additional context

No response

@najibghadri najibghadri added the bug Something isn't working label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant