shahradelahi / next-extra

⚡ Enhance Next.js Beyond Limits
https://www.npmjs.com/package/next-extra
MIT License
287 stars 5 forks source link

bug: breaks with latest next 15 canary #46

Open nahoc opened 1 week ago

nahoc commented 1 week ago
⨯ ./node_modules/next-extra/dist/chunk-YRCAJ3I7.js:3:1
Module not found: Can't resolve 'next/dist/client/components/static-generation-async-storage.external'
  1 | // src/utils/async-storages.ts
  2 | import { requestAsyncStorage } from "next/dist/client/components/request-async-storage.external";
> 3 | import {
    | ^^^^^^^^
> 4 |   staticGenerationAsyncStorage as _staticGenerationAsyncStorage
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 5 | } from "next/dist/client/components/static-generation-async-storage.external";
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  6 | function getExpectedStaticGenerationStore(callingExpression) {
  7 |   const staticGenerationStore = fetch.__nextGetStaticStore?.() ?? _staticGenerationAsyncStorage;
  8 |   const store = staticGenerationStore.getStore();

Import map: aliased to module "next" with subpath "/dist/client/components/static-generation-async-storage.external" inside of [project]/apps/*****

https://nextjs.org/docs/messages/module-not-found
shahradelahi commented 6 days ago

I checked out the Next.js source code, and StaticGenerationStore has just been removed, but it's not a big deal; it was expected.

There is something about the next/headers module, which is now promise-based, and there are no docs about why and how.

I won't fix this because Next 15 is not stable, and working on it is just a waste of time. My recommendation is to just stick with Next 14 until some stable releases.