Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Error: Cannot find module 'snyk' #57

Closed
dougy-fresh opened this issue Oct 26, 2022 · 5 comments
Closed

Error: Cannot find module 'snyk' #57

dougy-fresh opened this issue Oct 26, 2022 · 5 comments

Comments

@dougy-fresh
Copy link

» npm test

> gulp-snyk-client@1.0.0 test
> gulp test

Error: Cannot find module 'snyk'
Require stack:
- /Users/dougwade/code/gulp-snyk-client/node_modules/gulp-snyk/index.js
- /Users/dougwade/code/gulp-snyk-client/gulpfile.js
- /Users/dougwade/code/gulp-snyk-client/node_modules/gulp-cli/lib/shared/require-or-import.js
- /Users/dougwade/code/gulp-snyk-client/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
- /Users/dougwade/code/gulp-snyk-client/node_modules/gulp-cli/index.js
- /Users/dougwade/code/gulp-snyk-client/node_modules/gulp/bin/gulp.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/dougwade/code/gulp-snyk-client/node_modules/gulp-snyk/index.js:3:14)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12)
    at Module.require (node:internal/modules/cjs/loader:1028:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/dougwade/code/gulp-snyk-client/node_modules/gulp-snyk/index.js',
    '/Users/dougwade/code/gulp-snyk-client/gulpfile.js',
    '/Users/dougwade/code/gulp-snyk-client/node_modules/gulp-cli/lib/shared/require-or-import.js',
    '/Users/dougwade/code/gulp-snyk-client/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js',
    '/Users/dougwade/code/gulp-snyk-client/node_modules/gulp-cli/index.js',
    '/Users/dougwade/code/gulp-snyk-client/node_modules/gulp/bin/gulp.js'
  ]
}
@doug-wade
Copy link
Owner

looks like this issue is from a breaking change published in https://github.com/snyk/cli in a minor version. Their issue filing system says to email snyk support, which I've done.

@doug-wade
Copy link
Owner

In the short term, I've pulled together an example repo for using node's child_process to shell out to the snyk cli: https://github.com/doug-wade/gulp-snyk-client

@androiderik
Copy link

Thank you so much! in a short term I'll be using this side method

@doug-wade
Copy link
Owner

I got an update from snyk on this one:

Thanks for your patience on this issue. After doing some initial research on this and gathering logs and evidence on our side, it seems like we're going to need to escalate this to our engineering team. We have moved this ticket over to their queue and have prioritized it accordingly.

Although timeframes for this kind of issue can vary, generally these kind of problems do take a bit longer to solve due to the complexity and need for deeper analysis. It's still possible that this is a bug, an unsupported feature or some kind of configuration issue in the environment - we're not ruling anything out at this stage.

What we will do is keep you posted with updates as we learn more and get closer to solve the problem. If at any time you have any questions or concerns, please do not hesitate to reach out and let us know.

@doug-wade
Copy link
Owner

Snyk team said this:

As for programmatic access to the Snyk CLI, this is not something that is supported, although not impossible as you've accomplished through the gulp-snyk package! However, due to the lack of support, it's reasonable to expect that internal implementation details like those may change over time.

I'm not gonna keep up with this, so I'm going to deprecate the package and archive the repo

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

No branches or pull requests

3 participants