doug-wade/gulp-snyk

Protect emits error

doug-wade opened this issue · 0 comments

Currently, a protect task with no config

gulp.task('snyk-protect', function (cb) {
	return snyk({command: 'protect'}, cb);
});

throws the following error

doug-UX301LAA packages/generator-clefs-plugin ‹switch-to-snyk› » yarn 
yarn install v0.15.1
info No lockfile found.
[1/4] Resolving packages...
warning gulp-exclude-gitignore > gulp-ignore > gulp-match > minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-stream > minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp-xo > xo > eslint-plugin-import-order@2.1.4: Use eslint-plugin-import instead (order rule)
warning gulp > vinyl-fs > glob-watcher > gaze > globule > minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob > graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
[2/4] Fetching packages...
warning fsevents@1.0.15: The platform "linux" is incompatible with this module.
info "fsevents@1.0.15" is an optional dependency and failed compatibility check. Excluding it from installation.
warning lodash@1.0.2: The engine "rhino" appears to be invalid.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
$ gulp prepublish
[18:06:41] Using gulpfile ~/workplace/clefs/packages/generator-clefs-plugin/gulpfile.js
[18:06:41] Starting 'snyk-protect'...
[18:06:41] 'snyk-protect' errored after 11 ms
[18:06:41] Error: Command failed: /bin/sh -c /home/doug/workplace/clefs/packages/generator-clefs-plugin/node_modules/.bin/snyk protect 
/bin/sh: 1: /home/doug/workplace/clefs/packages/generator-clefs-plugin/node_modules/.bin/snyk: not found

    at ChildProcess.exithandler (child_process.js:213:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:829:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:486:12)
error Command failed with exit code 1.
info Visit http://yarnpkg.com/en/docs/cli/install for documentation about this command.

it's looking for the snyk installed by the user, but that kind of defeats the purpose ;)