Closed kensentor closed 4 years ago
that's odd.. maybe it's somehow restricted and not allowed to spawn child processes?
I wondered that too, but I can't find anything in the AWS docs that asserts this restriction exists. I only found a forum thread by someone saying that exec
apparently works: https://forums.aws.amazon.com/thread.jspa?threadID=290406 . Running Jest, JSHint, etc. are all working.
I guess the spawn
command comes from down in the audit-resolve-core
package somewhere?
spawn is called to actually run npm audit or yarn audit under the hood and parse it's output. that's the only API they have that's unlikely to change without warning.
afair Amazon is running their own build if node for functions, not sure about CI
I'll take it up with AWS. The necessary /bin/bash
is definitely there, the $PATH
is definitely there and it includes the node modules, so I don't know what it's barking about unless AWS has some kind of restriction in place. Thanks for taking a look.
I set up
check-audit
to run in my CI setup (AWS CodeBuild) but am receiving a curious error:It's being run inside an environment with Node v12 and NPM v6.13 (which is already running a bunch of Node commands) as part of a Bash script that is the CI process. I'm running it via
npm run check-audit
which aliases tonode node_modules/.bin/check-audit --production
.