Bundling of edge function failed

There have not been any changes made to the site. I triggered the β€œClear cache & deploy site” in hopes of it reviving a couple of Edge Functions after receiving

Redeploying has worked in the past, but not today :frowning:


…

3:30:06 PM: (Functions bundling completed in 13.1s)
3:30:06 PM: ​
3:30:06 PM: ────────────────────────────────────────────────────────────────
3:30:06 PM: 3. Edge Functions bundling
3:30:06 PM: ────────────────────────────────────────────────────────────────
3:30:06 PM: ​
3:30:06 PM: Packaging Edge Functions from netlify/edge-functions directory:
3:30:06 PM: - edge-login
3:30:06 PM: - eleventy-edge
3:30:06 PM: - speed-code
3:30:06 PM: - speed-test
3:30:09 PM: error: Uncaught (in promise) Error: Error: Could not find file: file:///opt/build/repo/netlify/edge-functions/_generated/eleventy-edge-app-data.js
3:30:09 PM: const ret = new Error(getStringFromWasm0(arg0, arg1));
3:30:09 PM: ^
3:30:09 PM: at __wbg_new_651776e932b7e9c7 (https://deno.land/x/eszip@v0.28.0/eszip_wasm.generated.js:313:19)
3:30:09 PM: at (https://deno.land/x/eszip@v0.28.0/eszip_wasm_bg.wasm:1:78732)
3:30:09 PM: at (https://deno.land/x/eszip@v0.28.0/eszip_wasm_bg.wasm:1:1463894)
3:30:09 PM: at (https://deno.land/x/eszip@v0.28.0/eszip_wasm_bg.wasm:1:1957066)
3:30:09 PM: at __wbg_adapter_18 (https://deno.land/x/eszip@v0.28.0/eszip_wasm.generated.js:144:6)
3:30:09 PM: at real (https://deno.land/x/eszip@v0.28.0/eszip_wasm.generated.js:128:14)
3:30:09 PM: ​
3:30:09 PM: ────────────────────────────────────────────────────────────────
3:30:09 PM: Bundling of edge function failed
3:30:09 PM: ────────────────────────────────────────────────────────────────
3:30:09 PM: ​
3:30:09 PM: Error message
3:30:09 PM: Command failed with exit code 1: deno run --allow-all --no-config --quiet /opt/buildhome/node-deps/node_modules/@netlify/edge-bundler/deno/bundle.ts {β€œbasePath”:β€œ/opt/build/repo”,β€œdestPath”:β€œ/tmp/edge-6349b788f9864303086dc3a9/27bc9c1e-7fec-4348-a620-010207f9fac2.eszip”,β€œfunctions”:[{β€œname”:β€œedge-login”,β€œpath”:β€œ/opt/build/repo/netlify/edge-functions/edge-login.js”},{β€œname”:β€œeleventy-edge”,β€œpath”:β€œ/opt/build/repo/netlify/edge-functions/eleventy-edge.js”},{β€œname”:β€œspeed-code”,β€œpath”:β€œ/opt/build/repo/netlify/edge-functions/speed-code.js”},{β€œname”:β€œspeed-test”,β€œpath”:β€œ/opt/build/repo/netlify/edge-functions/speed-test.js”}],β€œimportMapURL”:β€œdata:application/json;base64,eyJpbXBvcnRzIjp7Im5ldGxpZnk6ZWRnZSI6Imh0dHBzOi8vZWRnZS5uZXRsaWZ5LmNvbS92MS9pbmRleC50cyJ9fQ==”} (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
3:30:09 PM: error: Uncaught (in promise) Error: Error: Could not find file: file:///opt/build/repo/netlify/edge-functions/_generated/eleventy-edge-app-data.js
3:30:09 PM: const ret = new Error(getStringFromWasm0(arg0, arg1));
3:30:09 PM: ^
3:30:09 PM: at __wbg_new_651776e932b7e9c7 (https://deno.land/x/eszip@v0.28.0/eszip_wasm.generated.js:313:19)
3:30:09 PM: at (https://deno.land/x/eszip@v0.28.0/eszip_wasm_bg.wasm:1:78732)
3:30:09 PM: at (https://deno.land/x/eszip@v0.28.0/eszip_wasm_bg.wasm:1:1463894)
3:30:10 PM: Creating deploy upload records
3:30:09 PM: at (https://deno.land/x/eszip@v0.28.0/eszip_wasm_bg.wasm:1:1957066)
3:30:09 PM: at __wbg_adapter_18 (https://deno.land/x/eszip@v0.28.0/eszip_wasm.generated.js:144:6)
3:30:09 PM: at real (https://deno.land/x/eszip@v0.28.0/eszip_wasm.generated.js:128:14)
3:30:09 PM: ​
3:30:10 PM: Failed during stage β€˜building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
3:30:09 PM: Error location
3:30:09 PM: While bundling edge function

It appears to be happening inside your Eleventy-generated Edge Function. It’s worth opening an issue on their repo to get help with that.

@hrishikesh Thanks for the pointer.

The solution was posted at Edge deployment failures Β· Issue #2572 Β· 11ty/eleventy Β· GitHub

1 Like

Thanks for coming back and sharing!