patchCached

I am trying the new @opennextjs/cloudflare but I am having the error below: patchCached file:///Users/xxxxxxxxx/xxxxxxxxx/ixxxxxxxx/node_modules/@opennextjs/cloudflare/dist/cli/index.mjs:6860 throw new Error("Cache patch not applied"); ^ When I read Cloudflare code, it looks like this is related to cacheHandler. Here is the piece of code from Cloudflare code: // src/cli/build/patches/investigated/patch-cache.ts import path7 from "node:path"; function patchCache(code, config) { console.log("# patchCached"); const cacheHandler = path7.join(config.paths.internalPackage, "cli", "cache-handler.mjs"); const patchedCode = code.replace( "const { cacheHandler } = this.nextConfig;", const cacheHandler = null; CacheHandler = (await import('${cacheHandler}')).default; CacheHandler.maybeKVNamespace = process.env["${config.cache.kvBindingName}"]; ); if (patchedCode === code) { throw new Error("Cache patch not applied"); } return patchedCode; } Any help will be appreciate. Thank you guys.
1 Reply
Gad Mugambi
Gad Mugambi2w ago
Hello. Did you manage to solve the issue?
Want results from more Discord servers?
Add your server