5
votes

I tried to run gulp serve in my source directory. This command loaded all files and started to use my gulpfile.js.

As result I have the following error:

gulpInst.start.apply(gulpInst, toRun);
              ^

TypeError: Cannot read property 'apply' of undefined at C:\Users...\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129:19 at nextTickCallbackWith0Args (node.js:420:9) at process._tickCallback (node.js:349:13) at Function.Module.runMain (module.js:443:11) at startup (node.js:139:18) at node.js:974:3

First line of gulpfile.js is:

const gulp = require('gulp');

It is my first experience with node.js and gulp too. I have got needing to start existing application from sources, and for me this error message looks like error in framework found by framework. I feel that I did something wrong, but do not know what? How can I fix this problem?

1
What is gulpInst ?Weedoze
var gulpInst = require(env.modulePath); - from bin\gulp.jsValentine Zakharenko

1 Answers

4
votes

Try to reinstall gulp-cli :

npm install -g gulp-cli