Skip to content

[Bug] Using Alpha 1 and a creating tasklist instantly throws TypeError: W.gray is not a function #365

@arebee

Description

@arebee

Environment

  • OS: MacOS Version 26.0 Beta (25A5327h) Tahoe
  • Node Version: v24.5.0
  • Package: @clack/prompts
  • Package Version: "@clack/prompts": "^1.0.0-alpha.1",

Describe the bug
Creating a tasklist throws an error when executed. Other prompts are working e.g. Log messages are being displayed using prompt.log.step("API Token Validation");.

To Reproduce

Steps to reproduce the behavior:

  1. Create a new node app, using TypeScript
  2. Install using npm i @clack/prompts@alpha
  3. Create a test.ts
  4. add the following content.
import * as prompt from "@clack/prompts";

const log = prompt.taskLog({
      title: "This is my new taskLog",
    });

Expected behavior
Execution should continue and a tasklog object should be created.

Additional Information

node ./dist/test.js

Debugger listening on ws://127.0.0.1:56297/a0c1563b-540f-4a16-b259-334eaa59b71f
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Waiting for the debugger to disconnect...
file:///Volumes/Marvin/projects/migration-tools/ld-toggle/node_modules/@clack/prompts/dist/index.mjs:83
`)},info:t=>R.message(t,{symbol:e.blue(H)}),success:t=>R.message(t,{symbol:e.green(K)}),step:t=>R.message(t,{symbol:e.green(O)}),warn:t=>R.message(t,{symbol:e.yellow(q)}),warning:t=>R.warn(t),error:t=>R.message(t,{symbol:e.red(X)})},Qe=async(t,i)=>{for(const r of t){if(r.enabled===!1)continue;const s=J(i);s.start(r.title);const n=await r.task(s.message);s.stop(n||r.title)}},Ze=t=>{const i=t.output??process.stdout,r=Me(i),s=W.gray(o),n=t.spacing??1,a=3,l=t.retainLog===!0,c=D();i.write(`${s}
                                                                                                                                                                                                                                                                                                                                                                                                                                             ^

TypeError: W.gray is not a function
    at Module.Ze (file:///Volumes/Marvin/projects/migration-tools/ld-toggle/node_modules/@clack/prompts/dist/index.mjs:83:430)
    at file:///Volumes/Marvin/projects/migration-tools/ld-toggle/dist/test.js:2:20
    at ModuleJob.run (node:internal/modules/esm/module_job:371:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:669:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)

Node.js v24.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions