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

Cannot start the app #74

Closed
1 task done
rawnly opened this issue Mar 15, 2023 · 18 comments · Fixed by #77
Closed
1 task done

Cannot start the app #74

rawnly opened this issue Mar 15, 2023 · 18 comments · Fixed by #77
Labels
bug Something isn't working
Milestone

Comments

@rawnly
Copy link

rawnly commented Mar 15, 2023

Verify Next.js canary release

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

Describe the bug

CleanShot 2023-03-15 at 01 48 07

Expected behavior

I'd like to run the app

Reproduction link

repository
codesandbox link

Version

13.2.5-canary.3

Config

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

module.exports = nextConfig;

Additional context

No response

@rawnly rawnly added the bug Something isn't working label Mar 15, 2023
@hect1c
Copy link

hect1c commented Mar 15, 2023

This also happens with NextJS version 13.2.5-canary.4 I had to revert back to the following versions to get this working

  • next 13.1.6
  • next-superjson-plugin 0.4.9

@RealGatt
Copy link

Can also replicate. Causes a segmentation fault issue when building.

@orionmiz orionmiz added this to the Planned milestone Mar 16, 2023
@darthmaim
Copy link

This is the related issue in the next.js repo: vercel/next.js#46989. It's not just this plugin.

@orionmiz orionmiz pinned this issue Mar 17, 2023
@mauriceackel
Copy link

mauriceackel commented Mar 18, 2023

I ran into the same issue today. I got it working with:

  • next 13.2.3
  • next-superjson-plugin 0.5.6

I had to clear my .next folder to get it working after downgrading my NextJS version

@elie222
Copy link

elie222 commented Mar 18, 2023

Same issue here. Commenting out the use of the plugin till resolved.

@orionmiz
Copy link
Collaborator

This appears to be an issue from the recent turbopack update (vercel/next.js#46971)
There is nothing we can do on the plugin side, so please use a version of Next.js lower than 13.2.4 until the issue is resolved.

@kevin-courbet
Copy link

kevin-courbet commented Mar 20, 2023

Even after pinning 13.2.3 and 0.5.6 (rm node_modules .next), I am still getting an error, albeit a different one. The dev server will start, but as soon as there is a render, I'll get this.

failed to invoke `.../node_modules/.pnpm/[email protected]_bybiisvvvxj62fig2dzdxxp2ea/node_modules/next-superjson-plugin/dist/next_superjson.wasm` as js transform plugin at .../node_modules/.pnpm/[email protected]_bybiisvvvxj62fig2dzdxxp2ea/node_modules/next-superjson-plugin/dist/next_superjson.wasm
    1: RuntimeError: unreachable
    2: unreachable', /Users/runner/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/swc-0.245.27/src/plugin.rs:228thread '<unnamed><unnamed>' panicked at ':14' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some(".../src/app/layout.tsx")'

In the past 2 days I have tried various combinations of versions, going back to previous working commits (by deleting node_modules / .next), to no avail. Really puzzling...

For the time being, I just rolled out a quick and dirty serialization / deserialization utility /shrug.

@ericwang401
Copy link

A workaround is to downgrade to [email protected] and delete the .next folder and run your dev server. I was running [email protected] and downgraded to that version and it worked.

@totobest
Copy link

I got it working:

  • Downgraded to [email protected]
    "next": "13.2.3", in package.json
  • Run npm install
  • Deleted the .next folder
  • (Re)Started the dev server

@darthmaim
Copy link

The upstream issue in next.js was fixed in the latest canary, but plugins now need to update to the latest swc version.

qucumbah added a commit to qucumbah/gym-tracker that referenced this issue Apr 21, 2023
@orionmiz orionmiz mentioned this issue Apr 21, 2023
@orionmiz
Copy link
Collaborator

orionmiz commented Apr 21, 2023

It's been a long wait, everyone.

Please try next-superjson-plugin v0.5.7 with next canary.

@arnaudriegert
Copy link

Thank you @orionmiz

It works for me with [email protected] (not 13.3.0)

Also noteworthy that it seems I can serialize dates without the plugin on that canary version.

@arashi-dev
Copy link

[email protected] is out now :)
no need canary version anymore

@orionmiz orionmiz unpinned this issue May 4, 2023
@Ashutsoh1729
Copy link

Hello,
I am facing the error where i have used [email protected] and next-superjson-plugin v 0.5.7 but it shows error

Here Is the error

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/ashutoshhota/Coding/web development/Next JS/Ongoing Projects/Messenger Clone/Messenger Clone/Messenger-Clone/node_modules/next/dist/client/dev/amp-dev.js")'

Caused by:
0: failed to invoke /Users/ashutoshhota/Coding/web development/Next JS/Ongoing Projects/Messenger Clone/Messenger Clone/Messenger-Clone/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/ashutoshhota/Coding/web development/Next JS/Ongoing Projects/Messenger Clone/Messenger Clone/Messenger-Clone/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable
2: unreachable

Please help

@orionmiz
Copy link
Collaborator

@Ashutsoh1729 Please update Next.js and plugin

@Ashutsoh1729
Copy link

Thank you @orionmiz

I have now updated both to their latest versions and it worked. Thank you again.

@sneko
Copy link

sneko commented Feb 14, 2024

I was having the same issue while using Next.js v14.1.0, my solution was to downgrade both next-superjson-plugin and so superjson (since using it directly) to have superson v1 used.

Here my package.json:

    "next-superjson-plugin": "0.5.10",
    "next": "14.1.0",
    "superjson": "^1.13.3",

@michaeltrinh7
Copy link

It works. Thank you sneko

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

Successfully merging a pull request may close this issue.