aws-samples/amazon-cognito-passwordless-email-auth

npm install failed - cognito-email-auth-backend@1.0.0~postinstall: Failed to exec postinstall script

hanifasterling opened this issue · 3 comments

From the command prompt:
npm WARN create-auth-challenge@1.0.0 No description
npm WARN create-auth-challenge@1.0.0 No repository field.

audited 1 package in 1.035s
found 0 vulnerabilities

The system cannot find the path specified.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cognito-email-auth-backend@1.0.0 postinstall: cd ./lambda-triggers/create-auth-challenge && npm i && cd -
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cognito-email-auth-backend@1.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hanifa.amer\AppData\Roaming\npm-cache_logs\2020-10-20T09_49_46_440Z-debug.log

From the debug log:

58 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 373ms
59 timing audit body Completed in 1ms
60 silly lifecycle cognito-email-auth-backend@1.0.0postinstall: Returned: code: 1 signal: null
61 info lifecycle cognito-email-auth-backend@1.0.0
postinstall: Failed to exec postinstall script
62 verbose stack Error: cognito-email-auth-backend@1.0.0 postinstall: cd ./lambda-triggers/create-auth-challenge && npm i && cd -
62 verbose stack Exit status 1
62 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
62 verbose stack at EventEmitter.emit (events.js:315:20)
62 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
62 verbose stack at ChildProcess.emit (events.js:315:20)
62 verbose stack at maybeClose (internal/child_process.js:1051:16)
62 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)

Looks like Windows issue. Do you mind trying with a Unix-like shell such as sh, bash, zsh, "Linux Subsystem for Windows", Cygwin, Git bash.

It works nicely for WSL ... However, for Gitbash - the same issue.