NPM Gulp bug on Ubuntu 14.04 LTS

I just bought your screen cast theme development with gulp and bower, and I am running this on a VM (Ubuntu 14.04.2 LTS):

$ node -v && npm -v && gulp -v && bower -v
 v0.12.6
 2.11.2
[06:53:47] CLI version 3.9.0
[06:53:47] Local version 3.9.0
1.4.1
$ gulp
 module.js:338
    throw err;
          ^
 Error: Cannot find module 'minimist'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/share/nginx/html/wp-content/themes/rhc2015/gulpfile.js:2:20)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

I have tried this without any luck:

npm cache clear && rm -rf node_modules && npm install

Is the video out of date? Am I doing anything wrong?

Are there any errors when you run npm install?

It shows a set of unmet dependencies:

$ npm install
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/wiredep/node_modules/bower-config/node_modules/optimist requires minimist@'~0.0.1' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/minimist,
npm WARN unmet dependency which is version 1.1.1
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/vinyl-fs/node_modules/mkdirp requires minimist@'0.0.8' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/minimist,
npm WARN unmet dependency which is version 1.1.1
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-build/node_modules/download requires object-assign@'^2.0.0' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/object-assign,
npm WARN unmet dependency which is version 3.0.0
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download requires object-assign@'^2.0.0' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/object-assign,
npm WARN unmet dependency which is version 3.0.0
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/logalot/node_modules/squeak requires chalk@'^0.5.1' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/chalk,
npm WARN unmet dependency which is version 1.1.0
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/node_modules/bin-build/node_modules/download requires object-assign@'^2.0.0' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/object-assign,
npm WARN unmet dependency which is version 3.0.0
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/node_modules/bin-build/node_modules/download requires through2@'^0.6.1' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/through2,
npm WARN unmet dependency which is version 2.0.0
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download requires object-assign@'^2.0.0' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/object-assign,
npm WARN unmet dependency which is version 3.0.0
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download requires through2@'^0.6.1' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/through2,
npm WARN unmet dependency which is version 2.0.0
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/node_modules/logalot/node_modules/squeak requires chalk@'^0.5.1' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/chalk,
npm WARN unmet dependency which is version 1.1.0
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/node_modules/bin-build/node_modules/download requires object-assign@'^2.0.0' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/object-assign,
npm WARN unmet dependency which is version 3.0.0
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download requires object-assign@'^2.0.0' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/object-assign,
npm WARN unmet dependency which is version 3.0.0
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/node_modules/logalot/node_modules/squeak requires chalk@'^0.5.1' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-imagemin/node_modules/chalk,
npm WARN unmet dependency which is version 1.1.0
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/imagemin-pngcrush/node_modules/pngcrush-bin/node_modules/bin-build/node_modules/download/node_modules/gulp-decompress/node_modules/gulp-util requires object-assign@'^3.0.0' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/imagemin-pngcrush/node_modules/pngcrush-bin/node_modules/bin-build/node_modules/download/node_modules/object-assign,
npm WARN unmet dependency which is version 2.1.1
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/imagemin-pngcrush/node_modules/pngcrush-bin/node_modules/bin-build/node_modules/download/node_modules/gulp-decompress/node_modules/gulp-util requires through2@'^2.0.0' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/imagemin-pngcrush/node_modules/through2,
npm WARN unmet dependency which is version 0.6.5
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/imagemin-pngcrush/node_modules/pngcrush-bin/node_modules/bin-build/node_modules/download/node_modules/gulp-decompress/node_modules/gulp-util requires vinyl@'^0.5.0' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/imagemin-pngcrush/node_modules/pngcrush-bin/node_modules/bin-build/node_modules/download/node_modules/vinyl,
npm WARN unmet dependency which is version 0.4.6
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/imagemin-pngcrush/node_modules/pngcrush-bin/node_modules/bin-wrapper/node_modules/download/node_modules/gulp-decompress/node_modules/gulp-util requires object-assign@'^3.0.0' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/imagemin-pngcrush/node_modules/pngcrush-bin/node_modules/bin-wrapper/node_modules/download/node_modules/object-assign,
npm WARN unmet dependency which is version 2.1.1
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/imagemin-pngcrush/node_modules/pngcrush-bin/node_modules/bin-wrapper/node_modules/download/node_modules/gulp-decompress/node_modules/gulp-util requires through2@'^2.0.0' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/imagemin-pngcrush/node_modules/through2,
npm WARN unmet dependency which is version 0.6.5
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/imagemin-pngcrush/node_modules/pngcrush-bin/node_modules/bin-wrapper/node_modules/download/node_modules/gulp-decompress/node_modules/gulp-util requires vinyl@'^0.5.0' but will load
npm WARN unmet dependency /usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/imagemin-pngcrush/node_modules/pngcrush-bin/node_modules/bin-wrapper/node_modules/download/node_modules/vinyl,
npm WARN unmet dependency which is version 0.4.6

I know the unmet dependencies can be ignored, but I made some progress by editing

wp-content/themes/rhc2015/package.json

Changing the row

"gulp-autoprefixer": "^2.1.0",

to

"gulp-autoprefixer": "^2.3.0",

and changing

"browser-sync": "^2.7.1",

to

"browser-sync": "^2.7.10",

Removes the ‘minimist’ and ‘browser-sync’ errors and instead shows a different module as being problematic:

$ gulp
module.js:338
    throw err;
          ^
Error: Cannot find module 'process-nextick-args'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/share/nginx/html/wp-content/themes/rhc2015/node_modules/gulp-changed/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js:20:23)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

However, ‘gulp-changed’ is at it’s latest version so I can’t up the required version in package.json.

I don’t know what more to do. I tried creating a new Ubuntu 14.04 virtual machine and followed the screencast to the letter. But it does not work. I’m mulling requesting a refund. :frowning:

I’m sorry to hear that. While the screencast doesn’t really cover any personal support, Discourse is offered here as a community resource.

I’m surprised that an Ubuntu box is giving you issues, since it’s used by a large number of people for hosting and is able to run node, npm, gulp, etc., without issue generally.

How do you have node/npm installed? Have you followed this post? If you’ve done anymore debugging it might be helpful to post that as well.