tptompkins
2 years ago
3760
2
Mix

Any idea how I can fix this error? TypeError: gulp.hasTask is not a function

Posted 2 years ago by tptompkins

Hello,

I'm jumping back into an older Laravel 5.2 app that used to run gulp just fine but I went to run it today and it didn't work. I think I messed with my Node / NPM versions since I last ran it so I suspected this had something to do with it. I deleted my node_modules folder completely, downgraded my Node version to 6.4.0 then ran:

sudo npm install --global gulp-cli

Then I ran the following:

sudo npm install

After doing that I ran gulp and now I'm getting this error:

[20:07:55] Using gulpfile ~/eclipse-projects/ucpics/gulpfile.js
[20:07:55] Starting 'default'...
[20:07:55] 'default' errored after 2.25 ms
[20:07:55] TypeError: gulp.hasTask is not a function
    at /Users/tommytompkins/eclipse-projects/ucpics/node_modules/run-sequence/index.js:19:22
    at Array.forEach (native)
    at verifyTaskSets (/Users/tommytompkins/eclipse-projects/ucpics/node_modules/run-sequence/index.js:13:11)
    at runSequence (/Users/tommytompkins/eclipse-projects/ucpics/node_modules/run-sequence/index.js:92:2)
    at /Users/tommytompkins/eclipse-projects/ucpics/node_modules/laravel-elixir/tasks/default.js:18:16
    at taskWrapper (/Users/tommytompkins/eclipse-projects/ucpics/node_modules/undertaker/lib/set-task.js:13:15)
    at bound (domain.js:280:14)
    at runBound (domain.js:293:12)
    at asyncRunner (/Users/tommytompkins/eclipse-projects/ucpics/node_modules/async-done/index.js:55:18)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)

Anyone have any idea how I can fix this and still run gulp on Laravel 5.2? Thanks in advance!

Tommy

Please sign in or create an account to participate in this conversation.