|
"use strict";exports.id=466,exports.ids=[466],exports.modules={4466:(e,t,n)=>{n.d(t,{getCloudflareContext:()=>l});let o=Symbol.for("__cloudflare-context__");function l(e={async:!1}){return e.async?a():function(){let e=r();if(e)return e;if(function(){let e=globalThis;return e.__NEXT_DATA__?.nextExport===!0}())throw Error("\n\nERROR: `getCloudflareContext` has been called in sync mode in either a static route or at the top level of a non-static one, both cases are not allowed but can be solved by either:\n - make sure that the call is not at the top level and that the route is not static\n - call `getCloudflareContext({async: true})` to use the `async` mode\n - avoid calling `getCloudflareContext` in the route\n");throw Error(s)}()}function r(){return globalThis[o]}async function a(){let e=r();if(e)return e;{var t;let e=await i();return t=e,globalThis[o]=t,e}}async function i(e){let{getPlatformProxy:t}=await import(`${"__wrangler".replaceAll("_","")}`),n=e?.environment??process.env.NEXT_DEV_WRANGLER_ENV,{env:o,cf:l,ctx:r}=await t({...e,envFiles:[],environment:n});return{env:o,cf:l,ctx:r}}let s='\n\nERROR: `getCloudflareContext` has been called without having called `initOpenNextCloudflareForDev` from the Next.js config file.\nYou should update your Next.js config file as shown below:\n\n ```\n // next.config.mjs\n\n import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare";\n\n initOpenNextCloudflareForDev();\n\n const nextConfig = { ... };\n export default nextConfig;\n ```\n\n'}}; |