blitz-js / next-superjson-plugin

SuperJSON Plugin for Next.js Pages and Components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugin broke with Next 13.4.4

EvHaus opened this issue · comments

Verify Next.js canary release

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

Describe the bug

After upgrading from Next 13.4.3 to 13.4.4 using next-superjson-plugin now throws the following error during build:

- error ./node_modules/.pnpm/next@13.4.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/dev/amp-dev.js
Error: Filesystem cache is not enabled, cannot read plugin from phsyical path
- wait compiling...
- error ./node_modules/.pnpm/next@13.4.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/dev/amp-dev.js
Error: Filesystem cache is not enabled, cannot read plugin from phsyical path

Looks like that error is coming from swc but I'm not sure what changed between 13.4.3 and 13.4.4 that could use that.

Expected behavior

App should still run with next dev

Reproduction link

No response

Version

0.5.8

Config

// @ts-check

/**
 * @type {import('next').NextConfig}
 **/
module.exports = {
	experimental: {
		esmExternals: true,
		swcPlugins: [
			['next-superjson-plugin', {}],
		],
	},
	pageExtensions: ['page.tsx', 'page.ts'],
	reactStrictMode: true,
};


### Additional context

_No response_
commented

I got the same error yesterday. We are using nx workspace to run the nextjs application here are my configs

const withNx = require('@nx/next/plugins/with-nx');
const path = require('path');
/**
 * @type {import('@nx/next/plugins/with-nx').WithNxOptions}
 **/
const nextConfig = {
  pageExtensions: ['mdx', 'md', 'jsx', 'js', 'tsx', 'ts'],
  experimental: {
    swcPlugins: [["next-superjson-plugin", {}]],
  },
  sassOptions: {
    includePaths: [path.join(__dirname, 'styles')],
  },
  nx: {
    // Set this to true if you would like to to use SVGR
    // See: https://github.com/gregberge/svgr
    svgr: false,
  },
};

module.exports = withNx(nextConfig);

commented

I am experiencing the same error, by running yaarn build.
Removing swcPlugins from nextConfig or reverting next version to 13.4.3 fixed the problem for me.

Hey, I got this same issue.
Using: Nextjs 13.4.4

Screenshot 2023-06-02 at 3 07 57 PM

Same here

image

commented

vercel/next.js#50651

This PR will close the issue.

commented

Please check out v13.4.5-canary.7