Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gulp-cli version is not updating

Tags:

npm

gulp

I've updated gulp from v 3.9.0 to 4.0.0. When I run gulp i get error Cannot read property 'apply' of undefined. I've read that this is because of gulp-cli version 3.9.0 and I need to update to 2.1.0

On my local machine i've got all to work, and the versions are:

CLI Version: 2.1.0
Local Version: 4.0.0

But on our dev-server the CLI-version won't change and it's stuck at 3.9.0.

I have uninstalled both gulp and gulp-cli, removed the node_modules folder. Installed it again and it's the correct versions in the package.json.

"gulp": "^4.0.0",
"gulp-cli": "^2.1.0",

But when i run gulp -v now it still outputs CLI Version: 3.9.0..

Someone familiar with this? gulp 3.9.0 is globally installed on the server, can this cause the problem?

like image 852
Glidarn Avatar asked Nov 15 '25 04:11

Glidarn


1 Answers

First uninstall your current versions of Gulp and Gulp CLI:

npm uninstall gulp --save-dev
npm uninstall gulp -g

then go ahead and reinstall Gulp version 4.0.0:

npm install gulp-cli -g
npm install [email protected]
like image 152
Bilal Dekar Avatar answered Nov 17 '25 20:11

Bilal Dekar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!