Skip to content

[Bug]: The deployment failed: UNCAUGHT_EXCEPTION - Failed to load native binding for @swc/core #802

@Thesephi

Description

@Thesephi

Problem description

I have a custom Deno project, in which I use @swc/core. It works on local & remote (Ubuntu 24.04.1 where I deploy manually myself). But when deploying with Deno Deploy, the step Upload to Deno Deploy currently fails like so: https://github.com/fullsoak/examples/actions/runs/13147196665/job/36687795407#step:6:206

Error: The deployment failed: UNCAUGHT_EXCEPTION

Error: Failed to load native binding
    at Object.<anonymous> (file:///node_modules/.deno/@swc+core@1.10.12/node_modules/@swc/core/binding.js:329:11)
    at Object.<anonymous> (file:///node_modules/.deno/@swc+core@1.10.12/node_modules/@swc/core/binding.js:353:4)
    at Module._compile (node:module:745:34)
    at loadMaybeCjs (node:module:770:10)
    at Object.Module._extensions..js (node:module:755:12)
    at Module.load (node:module:662:32)
    at Function.Module._load (node:module:534:12)
    at Module.require (node:module:681:19)
    at require (node:module:812:16)
    at Object.<anonymous> (file:///node_modules/.deno/@swc+core@1.10.12/node_modules/@swc/core/index.js:49:17)

I'm aware this might also be an issue with @swc/core (not necessarily an issue with Deno Deploy alone), just that we're in an early stage everywhere and I feel a report for awareness wouldn't hurt. If I could help with further debugging ie pair-programming for example), I'd also be happy to!

Any suggestion is appreciated, thank you!

Steps to reproduce

  1. configure this GitHub repo for Deno Deploy: https://github.com/fullsoak/examples.git (feel free to fork if needed 🙂)
  2. use this script for the Install Step: deno install --allow-scripts=npm:@swc/core
  3. use this file for the Entrypoint: src/main.ts
  4. proceeding with Deno Deploy, notice that the "Install step" does succeed, but then it fails at the Upload to Deno Deploy step (example)

Expected behavior

The Deno Deploy process succeeds.

Environment

  • Deno version: 2.1.9
  • GitHub Action Runner version: 2.322.0 (runner image = ubuntu-24.04; OS = Ubuntu 24.04.1)

Possible solution

Atm I have no concrete knowledge, but the log Finishing deployment... did show up: https://github.com/fullsoak/examples/actions/runs/13147196665/job/36687795407#step:6:205

Meaning it crashes somewhere after this line in the deployctl logic: https://github.com/denoland/deployctl/blob/main/src/subcommands/deploy.ts#L350 - tho I'm not familiar with this logic, so please take this point only with a grain of salt.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions