Skip to content
This repository was archived by the owner on Jun 9, 2022. It is now read-only.
This repository was archived by the owner on Jun 9, 2022. It is now read-only.

node-npmaudit returns error on Windows #143

@tschmidtnimble

Description

@tschmidtnimble

Description

When running the module node-npmaudit on windows, an error is output as follows
node-npmaudit returned an error! spawn npm ENOENT

Steps to Reproduce

  1. .hawkeyerc contains "node-npmaudit" module
  2. Run npm run hawkeye scan --target .

Expected behavior:
No errors, npm audit successfully run

Actual behavior:
Error output

Version

npm 6.9.0, 6.12.0 or 6.13.0
"@hawkeyesec/scanner-cli": "^1.7.1"

Additional Information

Changing line 29 from 'npm audit --json' to 'npm.cmd audit --json' in @hawkeyesec\scanner-cli\lib\modules\node-npmaudit\index.js removes the issue.

https://stackoverflow.com/questions/43230346/error-spawn-npm-enoent/43285131

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions