Windows环境下Amplify CLI安装与初始化报错求助
AWS Amplify CLI 安装及初始化错误问题求助
我正在按照AWS Amplify教程部署Web应用,过程中遇到以下问题:
- 首次执行
npm install -g @aws-amplify/cli时,出现"failed to install amplify binary"错误,当时未留意该错误,继续执行教程中的amplify init -y命令,触发'Failed to get profile: Cannot read property 'accessKeyId' of undefined'错误。 - 卸载并重装CLI后,每次执行
npm install -g @aws-amplify/cli都会出现上述二进制安装错误,此时执行初始化命令会报错:Error: EPERM: operation not permitted, lstat 'C:\Users\caleb\.amplify\bin\amplify.exe'。 - 我推测问题由安装错误导致,已尝试以下排查操作,但均未解决问题:
- 执行
npm cache clean --force清理缓存 - 执行
npm rebuild重建依赖 - 将Node.js版本从v16.14.0更新至v16.17.0
- 执行
- 补充:经过数小时调试后重启电脑,现在可以正常执行
npm install -g @aws-amplify/cli,但执行amplify init -y仍会出现初始错误:'Failed to get profile: Cannot read property 'accessKeyId' of undefined'。
内容的提问来源于stack exchange,提问作者Caleb
相关产品推荐
相关产品推荐

