#next/flags: Code generation for chunk item errored

3 messages · Page 1 of 1 (latest)

viscid wasp
#

Im am litteraly following the tutorial

console:
`jackr@Jacks-PC MINGW64 /d/dev/Athenetz-SV (v0.0.2-dev)
$ yarn dev
▲ Next.js 15.0.2 (Turbopack)

✓ Starting...
✓ Ready in 3.1s
○ Compiling / ...
✓ Compiled / in 8.4s
⨯ ./node_modules/@vercel/flags/dist/next/index.js
Code generation for chunk item errored
An error occurred while generating the chunk item [project]/node_modules/@vercel/flags/dist/next/index.js [app-client] (ecmascript)

Caused by:

  • the chunking context (unknown) does not support external modules (request: node:async_hooks)

Debug info:

  • An error occurred while generating the chunk item [project]/node_modules/@vercel/flags/dist/next/index.js [app-client] (ecmascript)
  • Execution of *EcmascriptChunkItemContent::module_factory failed
  • Execution of *EcmascriptChunkItemContent::new failed
  • Execution of EcmascriptModuleContent::new failed
  • Execution of <EsmAssetReference as CodeGenerateable>::code_generation failed
  • the chunking context (unknown) does not support external modules (request: node:async_hooks)

○ Compiling /_error ...
✓ Compiled /_error in 1814ms
GET / 500 in 11288ms`

flags.ts:
`import { unstable_flag as flag } from '@vercel/flags/next';

export const gk_Main = flag({
key: 'GateKeeper_Main',
decide: () => false,
});`

page.tsx:
in next message (char limit)

lone rapidsBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

viscid wasp
#

page.tsx:
`"use client";

import UnderConstruction from "§comp/Homepage/UnderConstruction";
import LoggedOut from "§comp/Homepage/LoggedOut";
import LoggedIn from "§comp/Homepage/LoggedIn";
import { gk_Main } from "§api/flags";
import { fbauth } from "§api/firebase/firebase";
import { useAuthState } from "react-firebase-hooks/auth";

export default async function Decide() {
const gkMain = await gk_Main();
async function userexists(): Promise<boolean> {
const [user, loading, error] = useAuthState(fbauth);
if (user) {
return true;
} else {
return false;
}
}
if (!gkMain) {
return <UnderConstruction />;
} else {
if (await userexists()) {
return <LoggedIn />;
} else {
return <LoggedOut />;
}
}
}`