Skip to content

feat: update nextjs-shadcn to Next 15.4 - #122

Closed
sheepsteak wants to merge 3 commits into
mainfrom
chris/update-nextjs-shadcn
Closed

sheepsteak wants to merge 3 commits into
mainfrom
chris/update-nextjs-shadcn

Conversation

@sheepsteak

@sheepsteak sheepsteak commented Aug 6, 2026 •

Copy link
Copy Markdown
Member

ON HOLD: we need to implement AsyncLocalStorage in WebContainer before we can upgrade from the current Next.js version we use.

Created a brand new Next.js/Shadcn project and copied across necessary files from existing nextjs-shadcn.

Latest version we can do for now is Next.js 15.4 due to later versions using AsyncLocalStorage which is not implemented in WebContainer yet. See #122 (comment) for Next.16 errors.

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sheepsteak
sheepsteak marked this pull request as draft August 6, 2026 10:36
@sheepsteak

Copy link
Copy Markdown
Member Author

With default next dev we get this output:

Error: Turbopack is not supported on this platform (linux/x64) because native bindings are not available. Only WebAssembly (WASM) bindings were loaded, and Turbopack requires native bindings.

To use Next.js on this platform, use Webpack instead:
  next dev --webpack

Trying next dev --webpack then results in:

## Error Type
Runtime InvariantError

## Error Message
Invariant: Expected workStore to be initialized. This is a bug in Next.js.

Next.js version: 16.2.6 (Webpack)
image

@sheepsteak
sheepsteak force-pushed the chris/update-nextjs-shadcn branch from d50ec44 to e5e406e Compare August 6, 2026 11:00
@sheepsteak sheepsteak changed the title feat: update nextjs-shadcn to Next 16 feat: update nextjs-shadcn to Next 15.4 Aug 6, 2026
@sheepsteak

Copy link
Copy Markdown
Member Author

Closing for now as updated to WebContainer are needed.

@sheepsteak sheepsteak closed this Sep 30, 2026
@sheepsteak
sheepsteak deleted the chris/update-nextjs-shadcn branch September 30, 2026 15:26
b3hr4d added a commit to B3Pay/ic-reactor that referenced this pull request Oct 4, 2026
The lead opened each example on StackBlitz at 2ebc9b0. Two failed:

- vite-wallet (`npm test`): "Test Files no tests, Errors 14 errors", each
  "ReferenceError: Iterator is not defined" from `m-tree.js#cjs:75:32`.
  That is jsdom's lib/jsdom/living/helpers/dom-tree.js, whose line 75 is
  `class ChildrenIterator extends Iterator {` since jsdom 30.1.0. The
  WebContainer reports Node 22.22.3 but defines no global `Iterator`, and
  `^30.0.1` resolved to 30.1.2 there (the workspace lockfile holds 30.0.1,
  so CI never met it). vitest loads jsdom when a worker starts, before any
  setup file, so the fix is the version: jsdom 30.0.1, which has no
  reference to the global, pinned exactly in vite-wallet, next-ssr and
  icrc-ledger (whose jsdom test would fail the same way in StackBlitz's
  terminal). Each vitest.config.ts says why.
- next-ssr (`npm run dev -- --webpack`): GET / answered 500, "Invariant:
  Expected workStore to be initialized", from Next's own
  createServerSearchParamsForServerPage. Next 16 keeps the request's store
  in AsyncLocalStorage, which StackBlitz says WebContainer does not
  implement (stackblitz/starters#122). A production build renders through
  the same store, so its start command is now `npm test`, and its docs
  page says StackBlitz runs the tests and cannot serve the app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant