question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gutil.colors.stripColor is not a function

See original GitHub issue

gutil.colors is an instance of Chalk, which recently removed the stripColor method here.

I’m now getting this error any time a SASS error is encountered. Stack trace:

TypeError: gutil.colors.stripColor is not a function
    at errorM (/Users/jake/Repos/monolist-web/node_modules/gulp-sass/index.js:129:36)
    at Object.callback (/Users/jake/Repos/monolist-web/node_modules/gulp-sass/index.js:144:18)
    at options.error (/Users/jake/Repos/monolist-web/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:280:32)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
Cxarlicommented, Aug 19, 2017

@Lemmmy I made a temporary dirty workaround with:

# CoffeeScript
## -------------------------------
##   Dirty fix for gulp-sass#458
## -------------------------------
require 'gulp-util'

require.cache[
    Object.keys(require.cache)
        .find((x) -> x.indexOf('gulp-util/index') >= 0)
].exports.colors.stripColor = require 'strip-ansi'
## -------------------------------

or

// JavaScript
// -------------------------------
//   Dirty fix for gulp-sass#458
// -------------------------------

require('gulp-util')

require.cache[
    Object.keys(require.cache)
        .find((x) => x.indexOf('gulp-util/index') >= 0)
].exports.colors.stripColor = require('strip-ansi')
// -------------------------------

but I’d like to see it fixed here

0reactions
Lemmmycommented, Aug 19, 2017

Bump - having issues here too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Utility functions for gulp plugins
stripColor (str); object gulp-util.colors.styles ... contents = stream, buffer, or null if not read this.contents = file.contents || null; this.
Read more >
JavaScript gulp-util colors.yellow Examples
JavaScript colors.yellow - 10 examples found. ... Method/Function: yellow ... gulp.task('test',function () { return gutil.log(gutil.colors.yellow('Prod a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found