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

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

Open
1 task done
MichaelCharles opened this issue Mar 28, 2025 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@MichaelCharles
Copy link

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

> [email protected] 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/[email protected][email protected][email protected][email protected]/node_modules/next/dist/pages/_error.js
Error:   x failed to invoke plugin on 'Some("/Users/michaelaubrey/Projects/my-superjson-app/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/
  | pages/_error.js")'

Import trace for requested module:
./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/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

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