Skip to content

Build fails on Netlify with netlify adapter v6.x #59

@goodbase-studio

Description

@goodbase-studio

With SvelteOG configured with latest Svelte, SvelteKit, Vite and TypeScript packages, and the latest netlify adapter v6.x I get this error in Netlify (locally build successful instead):

10:44:40 AM: Functions bundling                                            
10:44:40 AM: ────────────────────────────────────────────────────────────────
10:44:40 AM: ​
10:44:40 AM: The Netlify Functions setting targets a non-existing directory: netlify/functions
10:44:40 AM: ​
10:44:40 AM: Packaging Functions from .netlify/functions-internal directory:
10:44:40 AM:  - sveltekit-render.mjs
10:44:40 AM: ​
10:44:40 AM: ✘ [ERROR] No loader is configured for ".wasm" files: .netlify/server/wasm/resvg-dd4dd8881e2df4e6.wasm
10:44:40 AM:     .netlify/server/chunks/resvg.js:2:18:
10:44:40 AM:       2 │ ..._mod = import("../wasm/resvg-dd4dd8881e2df4e6.wasm").then((r) =>...
10:44:40 AM:         ╵                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10:44:40 AM: ​
10:44:40 AM: Bundling of function "sveltekit-render" failed                
10:44:40 AM: ────────────────────────────────────────────────────────────────
10:44:40 AM: ​
10:44:40 AM:   Error message
10:44:40 AM:   Build failed with 1 error:
10:44:40 AM:   .netlify/server/chunks/resvg.js:2:18: ERROR: No loader is configured for ".wasm" files: .netlify/server/wasm/resvg-dd4dd8881e2df4e6.wasm
10:44:40 AM: ​
10:44:40 AM:   Error location
10:44:40 AM:   While bundling function "sveltekit-render"

Tried to edit the netlify.toml like this but nothing seems to work:

[build]
  publish = "build"
  command = "pnpm build"
[functions]
  node_bundler = "esbuild"
  included_files = [".netlify/server/wasm/*"]
  external_node_modules = ["@ethercorps/sveltekit-og", "@resvg/resvg-wasm", "resvg", "sharp"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions