This error may happen when we try switching gulp-li versions around and got things messed up along the way.
If you got this error, try removing the old gulp-cli globally by
npm remove -g gulp-cli and then reinstall it with
npm install -g gulp-cli.
Don’t forget to do closing and opening a new console window to get things worked out after the reinstalllation.