Skip to content

Seemingly incompatible with NextJS15: failed to invoke plugin on 'Some("...")' #116

@MichaelCharles

Description

@MichaelCharles

Verify Next.js canary release

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

Describe the bug

Attempting to use the plugin with a fresh NextJS 15 install results in a build error stating failed to invoke plugin on 'Some("...")'.

❯ pnpm build

> my-superjson-app@0.1.0 build /Users/michaelaubrey/Projects/my-superjson-app
> next build

   ▲ Next.js 15.3.0-canary.24
   - Experiments (use with caution):
     · swcPlugins

 ✓ Linting and checking validity of types
   Creating an optimized production build ...
Failed to compile.

./pages/api/hello.ts
Error:   x failed to invoke plugin on 'Some("/Users/michaelaubrey/Projects/my-superjson-app/pages/api/hello.ts")'

Import trace for requested module:
./pages/api/hello.ts

./node_modules/.pnpm/next@15.3.0-canary.24_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/next/dist/pages/_error.js
Error:   x failed to invoke plugin on 'Some("/Users/michaelaubrey/Projects/my-superjson-app/node_modules/.pnpm/next@15.3.0-canary.24_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/next/dist/
  | pages/_error.js")'

Import trace for requested module:
./node_modules/.pnpm/next@15.3.0-canary.24_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/next/dist/pages/_error.js

./pages/_app.tsx
Error:   x failed to invoke plugin on 'Some("/Users/michaelaubrey/Projects/my-superjson-app/pages/_app.tsx")'

./pages/_document.tsx
Error:   x failed to invoke plugin on 'Some("/Users/michaelaubrey/Projects/my-superjson-app/pages/_document.tsx")'

./pages/index.tsx
Error:   x failed to invoke plugin on 'Some("/Users/michaelaubrey/Projects/my-superjson-app/pages/index.tsx")'

Import trace for requested module:
./pages/index.tsx


> Build failed because of webpack errors
 ELIFECYCLE  Command failed with exit code 1.
    ~/Projects/my-superjson-app    main !5 ?1 

Expected behavior

I expect to be able to build without errors.

Reproduction link

https://github.com/MichaelCharles/my-superjson-app

Version

0.6.3

Config

import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  reactStrictMode: true,

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

export default nextConfig;

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions