Skip to content

[Bug] Bun v1.3.11 affecting cc-mirror #50

Open

Description

@pil1

Describe the Bug

6 | "use strict";
7 |
8 | //
9 | if (entry.instantiate)
10 | return entry.instantiate;
11 | var instantiatePromise = (async () => {
^
TypeError: Expected CommonJS module to have a function wrapper. If you weren't messing around with Bun's internals, this is a bug in Bun

Bun v1.3.11 (macOS arm64)

To Reproduce

Steps to reproduce the behavior:

  1. Run any variant after update via npx cc-mirror

Expected Behavior

The app should open...

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • OS: macOS
  • Node.js version:
  • cc-mirror version: latest version.
  • Provider: Zai, Minimax, and Kimi

Activity

  1. added
    bug
    on Mar 27, 2026
  2. matteocrippa commented on Mar 29, 2026

    @matteocrippa

    Seems related to Piebald-AI/tweakcc#624

  3. ymuuuu commented on Mar 30, 2026

    @ymuuuu

    this is not an issue of this tool, it is related to tweakcc and Bun and cc itself I guess.
    for the mean time use version 2.1.78. This is the closest version to the latest that I found to be working.

    npx cc-mirror update minimax --claude-version 2.1.78
  4. jhult commented on Apr 5, 2026

    @jhult
     6 |     "use strict";
     7 |
     8 |     //
     9 |     if (entry.instantiate)
    10 |         return entry.instantiate;
    11 |     var instantiatePromise = (async () => {
                                                   ^
    TypeError: Expected CommonJS module to have a function wrapper. If you weren't messing around with Bun's internals, this is a bug in Bun
    
    Bun v1.3.11 (macOS arm64)

    Thanks to @ymuuuu, running this command got me back up and running:

    bunx cc-mirror update glm --claude-version 2.1.78

  5. ducban commented on Apr 8, 2026

    @ducban

    cc-mirror update zclaude --claude-version latest

    Claude version 2.1.96 works fine with cc-mirror from my end. Let's give it a try.

  6. 1WorldCapture commented on Apr 12, 2026

    @1WorldCapture

    I fixed this issue with --no-tweak, so you could:

    • npx cc-mirror quick --provider mirror --name <name> --no-tweak
      or
    • npx cc-mirror update <name> --no-tweak

    The only cost is no tweak, but with running correctly and latest claude version

  7. whit3rabbit commented on Apr 26, 2026

    @whit3rabbit

    My PR addresses this: #53

  8. pil1 commented on Apr 27, 2026

    @pil1
    Author

    Your PR looks clean and proper - but this project might be dead, sadly. Which is a huge shame, because I use it every day.

  9. numman-ali commented on May 29, 2026

    @numman-ali
    Owner

    Thanks everyone for the reports and workarounds here. I’m keeping this as the canonical issue for recent native-runtime/tweakcc breakage. Fixes and hardening are prepared for the next 2.2.0 release, including validation/retry behavior and safer fallback when patching fails; I’ll leave this open until the release is out and current variants have had a chance to update.

  10. pil1 commented on May 30, 2026

    @pil1
    Author

    So glad to hear this isn't dead. One of the most useful utilities I use every day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions