Search code examples
node.jspowershellcommand-linegulp

Powershell not showing values of gulp tasks


My gulp tasks are not showing any values in Power Shell.

Everything is working, it's just a display problem. It happens for all different gulp plugins/tasks.

Down below you can see the screenshot of the actual problem. The lines with Css minified:, Css prefixed:, Finished 'cass_app' after should end with some duration.

The issue is not linked to any of the plugins or tasks (it also happens with browser-sync not displaying local ports)...

power shell log

Any idea ?

Thank you !


Solution

  • With your edit, I can see it now :D damn little numbers.

    I have taken a look at the source code? I think gulp CLI used ANSI color characters which are not supported fully by Powershell.

    Other workarounds I know for now:

    • Run with no-color flag: gulp <task_name> --no-color. This looks a bit dull.
    • If it's possible, use cmd instead. The outputs are fine, and you can keep the colors.
    • Or, from PS, you can delegate the task to cmd then print the output to PS console:

      $output = Invoke-Expression "gulp"
      $output
      

    There are some discussions on this topic: