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!