We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Error: spawn ... snyk ENOENT
When using npx @asos/snyker and snyk or @asos/snyker hasn't been globally installed you get the following error:
npx @asos/snyker
snyk
@asos/snyker
$ npx @asos/snyker Need to install the following packages: @asos/snyker Ok to proceed? (y) y [SNYKER: STARTING] [SNYKER: STEP 1]: Ensuring lockfile 'yarn.lock' is up to date. yarn install v1.22.15 info No lockfile found. [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Saved lockfile. Done in 0.21s. [SNYKER: STEP 2]: Deleting '.snyk' file. [SNYKER: STEP 3]: Getting vulnerable paths from Snyk. An error was thrown while executing the previous command. { error: Error: spawn /root/.npm/_npx/41eaf48ba153073a/node_modules/@asos/snyker/node_modules/.bin/snyk ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19) at onErrorNT (node:internal/child_process:477:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -2, code: 'ENOENT', syscall: 'spawn /root/.npm/_npx/41eaf48ba153073a/node_modules/@asos/snyker/node_modules/.bin/snyk', path: '/root/.npm/_npx/41eaf48ba153073a/node_modules/@asos/snyker/node_modules/.bin/snyk', spawnargs: [ 'test', '--dev', '--json', '--ignore-policy', '--strict-out-of-sync=true', '--file=yarn.lock', '--prune-repeated-dependencies' ] } } Retrying... An error was thrown while executing the previous command. { error: Error: spawn /root/.npm/_npx/41eaf48ba153073a/node_modules/@asos/snyker/node_modules/.bin/snyk ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19) at onErrorNT (node:internal/child_process:477:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -2, code: 'ENOENT', syscall: 'spawn /root/.npm/_npx/41eaf48ba153073a/node_modules/@asos/snyker/node_modules/.bin/snyk', path: '/root/.npm/_npx/41eaf48ba153073a/node_modules/@asos/snyker/node_modules/.bin/snyk', spawnargs: [ 'test', '--dev', '--json', '--ignore-policy', '--strict-out-of-sync=true', '--file=yarn.lock', '--prune-repeated-dependencies' ] } } Exiting...
This is as a result of the hardcorded path to the snyk binary, which is incorrect in npx contexts.
npx
The text was updated successfully, but these errors were encountered:
[#3] Remove hardcoded snyk path (#4)
4da1ea9
asos-craigmorten
Successfully merging a pull request may close this issue.
Issue
Details
When using
npx @asos/snyker
andsnyk
or@asos/snyker
hasn't been globally installed you get the following error:This is as a result of the hardcorded path to the
snyk
binary, which is incorrect innpx
contexts.The text was updated successfully, but these errors were encountered: