Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup issue "gulp.parallel is not a function" #36

Closed
stepan-leibo opened this issue Sep 12, 2018 · 3 comments
Closed

Startup issue "gulp.parallel is not a function" #36

stepan-leibo opened this issue Sep 12, 2018 · 3 comments

Comments

@stepan-leibo
Copy link

stepan-leibo commented Sep 12, 2018

I did the following steps to start code-forensics

npm init
npm i code-forensics
touch gulpfile.js
require('code-forensics').configure(
  {
    repository: {
      rootPath: "/path/to/my/own/repo",
    }
  }
);

gulp webserver

I've got the following exception:

/cfissue/node_modules/code-forensics/lib/index.js:32
    throw e;
    ^

TypeError: gulp.parallel is not a function
    at module.exports (/cfissue/node_modules/code-forensics/lib/tasks/code_analysis_tasks.js:38:30)
    at /cfissue/node_modules/code-forensics/lib/index.js:25:24
    at arrayEach (/cfissue/node_modules/lodash/lodash.js:516:11)
    at Function.forEach (/cfissue/node_modules/lodash/lodash.js:9342:14)
    at Object.module.exports.configure (/cfissue/node_modules/code-forensics/lib/index.js:24:7)
    at Object.<anonymous> (/cfissue/gulpfile.js:1:89)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)
    at Liftoff.execute (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:203:12)
    at module.exports (/usr/local/lib/node_modules/gulp/node_modules/flagged-respawn/index.js:51:3)
gulp -v
[16:24:37] CLI version 3.9.1
[16:24:37] Local version 3.9.1
@smontanari
Copy link
Owner

code-forensics requires gulp v4. My guess is that when you invoke gulp on the command line you actually end up running the version that was installed globally on your system (under /usr/local/lib/node_modules/gulp) which is at 3.9.1. You must run the gulp command through the module that comes with code-forensics, or you must update the global version

@smontanari
Copy link
Owner

smontanari commented Sep 14, 2018

The gulp v4 requirement is mentioned in the CHANGELOG, but I will make it more explicit in the main README file, because the install instructions make too much of an assumption that you would have to run gulp that way

@stepan-leibo
Copy link
Author

Thank you for your explanation!
Can see it in the docs now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants