首页 > 解决方案 > 放大配置 - 错误:uncaughtException: spawn cmd ENOENT

问题描述

放大配置错误 - 错误:uncaughtException: spawn cmd ENOENT

C:\Users\Home>放大配置

请按照以下步骤设置对您的 AWS 账户的访问权限:

登录您的 AWS 管理员账户:

https://console.aws.amazon.com/

按 Enter 继续

2020-07-18T09:41:08.083Z - error: uncaughtException: spawn cmd ENOENT date=Sat J
ul 18 2020 15:11:08 GMT+0530 (India Standard Time), pid=4536, uid=null, gid=null
, cwd=C:\Users\Home, execPath=C:\Users\Home\AppData\Roaming\npm\node_modules\nod
e\bin\node.exe, version=v10.0.0, argv=[C:\Users\Home\AppData\Roaming\npm\node_mo
dules\node\bin\node.exe, C:\Users\Home\AppData\Roaming\npm\node_modules\@aws-amp
lify\cli\bin\amplify, configure], rss=290361344, heapTotal=251351040, heapUsed=2
07170688, external=2257815, loadavg=[0, 0, 0], uptime=6909, trace=[column=19, fi
le=internal/child_process.js, function=Process.ChildProcess._handle.onexit, line
=217, method=onexit, native=false, column=16, file=internal/child_process.js, fu
nction=onErrorNT, line=394, method=null, native=false, column=19, file=internal/
process/next_tick.js, function=process._tickCallback, line=174, method=_tickCall
back, native=false, column=11, file=internal/modules/cjs/loader.js, function=Mod
ule.runMain, line=721, method=runMain, native=false, column=19, file=internal/bo
otstrap/node.js, function=startup, line=228, method=null, native=false, column=3
, file=internal/bootstrap/node.js, function=bootstrapNodeJSCore, line=575, metho
d=null, native=false], stack=[Error: spawn cmd ENOENT,     at Process.ChildProce
ss._handle.onexit (internal/child_process.js:217:19),     at onErrorNT (internal
/child_process.js:394:16),     at process._tickCallback (internal/process/next_t
ick.js:174:19),     at Function.Module.runMain (internal/modules/cjs/loader.js:7
21:11),     at startup (internal/bootstrap/node.js:228:19),     at bootstrapNode
JSCore (internal/bootstrap/node.js:575:3)]

安装节点

安装 @aws-amplify/cli

节点版本 12.0.0

放大版本 4.24.2

标签: node.jsaws-amplifyaws-amplify-cli

解决方案


尝试将 system32 添加到 PATH 变量中,看看它是否解决了您的问题

export PATH=$PATH:/c/Windows/System32 

然后运行

amplify configure

推荐阅读