5

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?

2
  • 1
    What is gulpInst ? Commented Oct 24, 2016 at 13:51
  • var gulpInst = require(env.modulePath); - from bin\gulp.js Commented Oct 24, 2016 at 13:58

1 Answer 1

4

Try to reinstall gulp-cli :

npm install -g gulp-cli
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.