When running ntl-dev on my site cerulean-platypus-2f048d.netlify.app, I am running into this error:
Could not load edge function at 'C:\Users\summe\Documents\GitHub\kc-next\.netlify\edge-functions\next-dev\index.js'
TypeError: Module not found "file:///C:/v91/next@12.2.5/deno/dist/compiled/cookie.js".
at file:///C:/Users/summe/Documents/GitHub/kc-next/.netlify/edge-functions/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/spec-extension/request.js:2:23
at async file:///C:/Users/summe/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/@netlify/edge-bundler/deno/config.ts:7:10 {
code: "ERR_MODULE_NOT_FOUND"
}
◈ Failed to run Edge Function next-dev:
TypeError: Module not found "file:///C:/v91/next@12.2.5/deno/dist/compiled/cookie.js".
at file:///C:/Users/summe/Documents/GitHub/kc-next/.netlify/edge-functions/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/spec-extension/request.js:2:23
at async file:///C:/Users/summe/AppData/Local/Temp/tmp-29524-Y4dzCs87VEpK/dev.js:7:35 {
code: "ERR_MODULE_NOT_FOUND"
}
[next-dev] TypeError: func.function is not a function
at https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/function_chain.ts:330:28
at https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/util/named_wrapper.ts:19:24
at nf_req_3e312f57-fc62-439b-8f81-262e53ee3e4d (https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/util/named_wrapper.ts:12:68)
at callWithNamedWrapper (https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/util/named_wrapper.ts:19:10)
at FunctionChain.runFunction (https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/function_chain.ts:329:30)
at FunctionChain.run (https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/function_chain.ts:280:33)
at handleRequest (https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/handler.ts:59:34)
at Server.<anonymous> (https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/server.ts:29:23)
at Server.#respond (https://deno.land/std@0.136.0/http/server.ts:298:37)
at Server.#serveHttp (https://deno.land/std@0.136.0/http/server.ts:340:20)
[next-dev] TypeError: func.function is not a function
at https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/function_chain.ts:330:28
at https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/util/named_wrapper.ts:19:24
at nf_req_b5ea1c66-68da-4142-a1e9-1045398a64b4 (https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/util/named_wrapper.ts:12:68)
at callWithNamedWrapper (https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/util/named_wrapper.ts:19:10)
at FunctionChain.runFunction (https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/function_chain.ts:329:30)
at FunctionChain.run (https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/function_chain.ts:280:33)
at handleRequest (https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/handler.ts:59:34)
at Server.<anonymous> (https://638f0e00dc20510008d6a1f4--edge.netlify.com/bootstrap/server.ts:29:23)
at Server.#respond (https://deno.land/std@0.136.0/http/server.ts:298:37)
at Server.#serveHttp (https://deno.land/std@0.136.0/http/server.ts:340:20)
event - compiled client and server successfully in 11s (436 modules)
I found a topic with a similar issue here, but none of the solutions provided in that thread have worked for me.
I am running:
Windows 10 64bit
Next v 12.3.1
Node v 16.20.1 (also tried 18.12.1)
deno v 1.37.2 (which I uninstalled and reinstalled)
and have tried netlify/plugin-nextjs versions 4.32.2, 4.41.0, and 4.40.1.
I also uninstalled netlify/plugin-nextjs completely and that also made no difference.
I have also gotten several emails regarding incidents of Edge Functions Invocations failing, which is what I am experiencing now.