Closed sabsaxo closed 6 years ago
And by the way, why not make it IMPOSSIBLE to have diverging version in the first place, so that users don't have all this fiddling around, and guessing to do? Just asking.
OK, so doing:
npm i gulp@next
Gives me:
[14:39:52] CLI version 2.0.1
[14:39:52] Local version 4.0.0
And now it's working.
Happy (well), but confused.
@sabsaxo You rely on the API of gulp@next
in one project and gulp@3
in another and you have gulp@3
installed globally, what happens? It doesn't work - project dependencies should be isolated and global dependencies are just bad.
You need a version agnostic CLI that just loads the local version blindly. This is what gulp-cli is. Your CLI version doesn't matter, because it supports all versions of gulp.
And by the way, why not make it IMPOSSIBLE to have diverging version in the first place, so that users don't have all this fiddling around, and guessing to do?
You didn't need to do any fiddling, gulp-cli doesn't care what your local project version is. If you have Local Version: 4.0.0
you're using gulp 4, period. You didn't need to do anything.
Instructions to use gulp 4: npm i gulp@next
and done.
npm install -g gulp-cli
as per https://github.com/gulpjs/gulp/blob/master/docs/getting-started/1-quick-start.md
Thanks, for clearing that out. But the confusion is there non the less.
Why did running:
npm i gulp@next
downgrade the CLI from 3.9.1 to 2.0.1?
@sabsaxo The CLI is installed globally and isn't even the same package, npm i gulp@next
would absolutely not do anything to your gulp-cli version. If it did, that would be a major bug in NPM that you should report there.
Not sure why you reopened but I'm closing this because this isn't a bug. If you have questions about using NPM or issues with NPM you can use StackOverflow or the NPM issue tracker.
What would be the explanation of the different versions shown in the terminal when running gulp --version
:
[14:28:52] CLI version 3.9.1
[14:28:52] Local version 4.0.0
vs
[14:39:52] CLI version 2.0.1
[14:39:52] Local version 4.0.0
after running npm i gulp@next
?
@sabsaxo - I just ran into the same thing and logically it makes no sense. It was driving me nuts too because I kept thinking I was somehow installing an older cli package...only to find out the current npm gulp-cli version is 2.2.0. Upgrading to a lower version number.
@sabsaxo - I wonder if the original cli was a part of the gulp package, and later they split it out to its own gulp-cli package - and reset the gulp-cli version numbers. This repo is only 2 years old (right around the time that gulp 4 came out) while the gulp 3, probably with an embedded cli, was out for many years. Its the only logical thing I can come up with.
@rolinger yes, that is correct. More information here: https://medium.com/gulpjs/gulp-sips-command-line-interface-e53411d4467
I have these version:
But simply cannot figure out how to upgrade the CLI version!
How do I do that?
And in the end I'd simply just like to have Gulp working on my machine, no more no less.