Cannot get `gulp` running on Sage 8.1.1

Hello, I’m working on a WP theme built in late 2016 on Sage 8.1.1. I’m banging my head against the wall trying to get gulp to run.

When I run gulp in my theme directory, I get the following:

[12:50:26] Using gulpfile ~/Library/Mobile Documents/com~apple~CloudDocs/Websites/soulshepherding.org/wp-content/themes/the-good-shepherd/gulpfile.js
[12:50:26] Starting 'clean'...
[12:50:26] Finished 'clean' after 11 ms
[12:50:26] Starting 'default'...
[12:50:26] Starting 'build'...
[12:50:26] Starting 'wiredep'...
[12:50:26] Finished 'default' after 183 ms
[12:50:26] Finished 'wiredep' after 254 ms
[12:50:26] Starting 'styles'...
path.js:28
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at Object.dirname (path.js:1349:5)
    at /Users/david/Library/Mobile Documents/com~apple~CloudDocs/Websites/soulshepherding.org/wp-content/themes/the-good-shepherd/node_modules/clean-css/lib/utils/input-source-map-tracker.js:191:56
    at Array.forEach (<anonymous>)
    at trackContentSources (/Users/david/Library/Mobile Documents/com~apple~CloudDocs/Websites/soulshepherding.org/wp-content/themes/the-good-shepherd/node_modules/clean-css/lib/utils/input-source-map-tracker.js:188:20)
    at InputSourceMapStore.trackLoaded (/Users/david/Library/Mobile Documents/com~apple~CloudDocs/Websites/soulshepherding.org/wp-content/themes/the-good-shepherd/node_modules/clean-css/lib/utils/input-source-map-tracker.js:255:3)
    at fromString (/Users/david/Library/Mobile Documents/com~apple~CloudDocs/Websites/soulshepherding.org/wp-content/themes/the-good-shepherd/node_modules/clean-css/lib/utils/input-source-map-tracker.js:32:8)
    at InputSourceMapStore.track (/Users/david/Library/Mobile Documents/com~apple~CloudDocs/Websites/soulshepherding.org/wp-content/themes/the-good-shepherd/node_modules/clean-css/lib/utils/input-source-map-tracker.js:236:5)
    at Object.whenDone (/Users/david/Library/Mobile Documents/com~apple~CloudDocs/Websites/soulshepherding.org/wp-content/themes/the-good-shepherd/node_modules/clean-css/lib/clean.js:145:44)
    at processNext (/Users/david/Library/Mobile Documents/com~apple~CloudDocs/Websites/soulshepherding.org/wp-content/themes/the-good-shepherd/node_modules/clean-css/lib/imports/inliner.js:105:13)

Any advice would be much appreciated!

Ok I got it working (finally). Looks like the issue was that gulp-minify-css is deprecated in favor of gulp-clean-css. I added "gulp-clean-css": "^3.4.14" to my package.json file and replaced .minifyCss with .cleanCss in my gulpfile.js.

2 Likes