Skip to content

Setup wizard fails with error on latest version #10

Closed

Description

@kunzaatko

Short description

When running bunx @cortexkit/aft-opencode@latest setup the wizard fails with an error pointing to non-existing type.

What happened?

The error:

 $ bunx @cortexkit/aft-opencode@latest setup
file:///private/var/folders/yv/24zcyrzn0tsdg78xckk5mx0c0000gp/T/bunx-502-@cortexkit/aft-opencode@latest/node_modules/@cortexkit/aft-opencode/dist/cli.js:9528
import { styleText as t, stripVTControlCharacters as ne } from "node:util";
         ^^^^^^^^^
SyntaxError: The requested module 'node:util' does not provide an export named 'styleText'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)

Node.js v19.9.0

Plugin version

Current latest as of 15/04/2026

Platform

MacOS arm64

Activity

  1. ualtinok commented on Apr 18, 2026

    @ualtinok
    Collaborator

    Fixed in v0.13.1.

    Root cause: `bunx` honored the package's `#!/usr/bin/env node` shebang and delegated execution to your Node 19.9.0, which lacks `node:util.styleText` (added in Node 20.12). The CLI's `@clack/prompts` dependency requires that export.

    Fix: Use `bunx --bun` instead of `bunx`. The `--bun` flag tells bun to run the JavaScript directly with its own runtime, completely bypassing the node shebang.

    Updated command:
    ```bash
    bunx --bun @cortexkit/aft-opencode@latest setup
    ```

    All documented commands in the README and CLI help now use `--bun`. Thanks for reporting!

  2. added a commit that references this issue on Apr 20, 2026
    7454a47
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions