Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gulp fails with message: object expected

Tags:

node.js

gulp

I'm trying to use gulp on w7. gruntjs works .. node works ... If i start gulp without gulp file, it runs fine .. saying 'no gulpfile found'

gulp -v gives: cli version 3.5.6, local version 3.5.6

installed it using: npm install -g gulp npm install --save-dev gulp

If I use the following gulpfile:

var gulp = require('gulp');

It results in error dialog:

Windows Script Host
Line 1
Char 1
Object Expected
800A138F
Microsoft JScript runtime error

I did try a more lengthy gulp file, but same error ... by deleting lines, I tried to isolate the problem .. until the file was empty .. that was ok.

Any ideas?

like image 435
Paul0515 Avatar asked Mar 17 '14 17:03

Paul0515


Video Answer


1 Answers

Here are steps I used to solve that issue:

  1. if your tasks file is gulp.js, rename it to gulpfile.js
  2. Install gulp globally > npm install -g gulp
  3. Test installation > gulp -v

You are good if you can see the version number of your gulp task runner!

like image 135
P.M Avatar answered Sep 23 '22 01:09

P.M