Add support for React 19

Can you help me update to the latest version of

from the latest source

because my team webagility.io had version response error, so we fixed the code and requested @plasmicapp/react-ssr-prepass - npm updated code
Please help me update the latest code from source @plasmicapp/react-ssr-prepass - npm to your plasmic library

1 Like

Can you share the errors that you are seeing?

https://www.reddit.com/r/nextjs/comments/1g9cqyq/anyone_upgraded_to_nextjs_15/

1 Like

Hi there! We’re experiencing the same issue here. We’d also like to upgrade to Next 15 and React 19 to improve our site speed ;).

If there’s something we can do, let us know!

Hi, we’ve fixed @plasmicapp/react-ssr-prepass to support v15 + pages router.

1 Like

Hi!

We’ve upgraded to the latest version of @plasmicapp/loader-nextjs (^1.0.407), however, we’re still getting the above issue:

Error: Failed to collect configuration for /[locale]/[[...page]]
    at <unknown> (/Users/casper/Developer/work/stampix/webshop/node_modules/.pnpm/next@15.0.3_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.0_react-dom@19._2kx6z4kmkiodnzrs3be42byaru/node_modules/next/dist/build/utils.js:1131:23)
    at async Span.traceAsyncFn (/Users/casper/Developer/work/stampix/webshop/node_modules/.pnpm/next@15.0.3_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.0_react-dom@19._2kx6z4kmkiodnzrs3be42byaru/node_modules/next/dist/trace/trace.js:153:20) {
  [cause]: TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
      at 703 (/Users/casper/Developer/work/stampix/webshop/apps/storefront/.next/server/app/[locale]/(marketing)/[[...page]]/page.js:9:15715)
      at t (/Users/casper/Developer/work/stampix/webshop/apps/storefront/.next/server/webpack-runtime.js:1:485)
      at 12819 (/Users/casper/Developer/work/stampix/webshop/apps/storefront/.next/server/app/[locale]/(marketing)/[[...page]]/page.js:8:43563)
      at t (/Users/casper/Developer/work/stampix/webshop/apps/storefront/.next/server/webpack-runtime.js:1:485)
      at 36673 (/Users/casper/Developer/work/stampix/webshop/apps/storefront/.next/server/app/[locale]/(marketing)/[[...page]]/page.js:1:3242)
      at Function.t (/Users/casper/Developer/work/stampix/webshop/apps/storefront/.next/server/webpack-runtime.js:1:485)
      at async getLayoutOrPageModule (/Users/casper/Developer/work/stampix/webshop/node_modules/.pnpm/next@15.0.3_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.0_react-dom@19._2kx6z4kmkiodnzrs3be42byaru/node_modules/next/dist/server/lib/app-dir-module.js:37:15)
      at async collectAppPageSegments (/Users/casper/Developer/work/stampix/webshop/node_modules/.pnpm/next@15.0.3_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.0_react-dom@19._2kx6z4kmkiodnzrs3be42byaru/node_modules/next/dist/build/segment-config/app/app-segments.js:50:45)
      at async (/Users/casper/Developer/work/stampix/webshop/node_modules/.pnpm/next@15.0.3_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.0_react-dom@19._2kx6z4kmkiodnzrs3be42byaru/node_modules/next/dist/build/utils.js:1129:28)
}

More specifically, Plasmic is using React’s SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?:

            tx =
              i().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ||
              i()
                .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
            tP = tx.ReactCurrentDispatcher || tx,

Let us know if you need additional information :pray:!

Are you using app router?

Yes, correct. Using Next 15 w/ App Router

Are you using plasmic/packages/nextjs-app-router at master · plasmicapp/plasmic · GitHub ? This app router solution is still experimental, we are prioritizing the support of pages router for now, since we are considering a better approach to integrate it. Do you have pages on production with it?

Are there any drawbacks to using this experimental solution? We can’t easily switch back to Pages Router at the moment

Edit: seems like this solution won’t work since we’d like to have these pages be static instead of SSR. We don’t have access to searchParams on static pages

The drawbacks are mostly related to UX/DX, limitations of what you can do in Plasmic + RSC and some hacky lines of code to be able to make it work (as you saw, it’s necessary to access some internals of React).

Can you try again in the version “1.0.408”?

2 Likes

Thanks, I updated to version 1.0.408 and It worked. Nice <3

Thanks! I’ve upgraded to .408 and it works with the Pages Router solution in App Router. Will continue using that for now unless you see issues with that performance/compat wise?