AWS Amplify CLI:将资源推送到云时发生错误

问题描述

我正在尝试使用放大推送将一些对 lambda 函数的更改上传到后端。我已经使用它很多次了,没有任何问题,但突然间我收到错误并且无法将资源推送到云端

执行以下操作后发生错误

Successfully pulled backend environment dev from the cloud.

我收到了各种错误消息。这是第一个

Command Failed with exit code 1: C:\Users\Name\go\bin\build-lambda-zip.exe -o H:\Documents\React 
JS\ihubdashboard\amplify\backend\function\testgo\dist\latest-build.zip H:\Documents\React 
JS\ihubdashboard\amplify\backend\function\testgo\bin\main
Failed to compress file: open H:\Documents\React 
JS\ihubdashboard\amplify\backend\function\testgo\bin\main: The system cannot find the file specified.
An error occurred during the push operation: Command Failed with exit code 1: 
C:\Users\Name\go\bin\build-lambda-zip.exe -o H:\Documents\React 
JS\ihubdashboard\amplify\backend\function\testgo\dist\latest-build.zip H:\Documents\React 
JS\ihubdashboard\amplify\backend\function\testgo\bin\main
Failed to compress file: open H:\Documents\React 
JS\ihubdashboard\amplify\backend\function\testgo\bin\main: The system cannot find the file specified.

这是另一个

Command Failed with exit code 1: C:\Users\Name\go\bin\build-lambda-zip.exe -o H:\Documents\React 
JS\ihubdashboard\amplify\backend\function\completeregistration\dist\latest-build.zip 
H:\Documents\React JS\ihubdashboard\amplify\backend\function\completeregistration\bin\main
Failed to compress file: open H:\Documents\React 
JS\ihubdashboard\amplify\backend\function\completeregistration\bin\main: The system cannot find the 
file specified.
An error occurred during the push operation: Command Failed with exit code 1: 
C:\Users\Name\go\bin\build-lambda-zip.exe -o H:\Documents\React 
JS\ihubdashboard\amplify\backend\function\completeregistration\dist\latest-build.zip 
H:\Documents\React JS\ihubdashboard\amplify\backend\function\completeregistration\bin\main
Failed to compress file: open H:\Documents\React 
JS\ihubdashboard\amplify\backend\function\completeregistration\bin\main: The system cannot find the 
file specified.

Command Failed with exit code 1: go get -u github.com/aws/aws-lambda-go/cmd/build-lambda-zip
# cd C:\Users\Name\go\src\github.com\aws\aws-lambda-go; git pull --ff-only
fatal: Unable to create 'C:/Users/Name/go/src/github.com/aws/aws-lambda-go/.git/ORIG_HEAD.lock': File 
exists.

这是我收到的当前错误消息:

If no other git process is currently running,this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
package github.com/aws/aws-lambda-go/cmd/build-lambda-zip: exit status 128
An error occurred during the push operation: Command Failed with exit code 1: go get -u 
github.com/aws/aws-lambda-go/cmd/build-lambda-zip
# cd C:\Users\Name\go\src\github.com\aws\aws-lambda-go; git pull --ff-only
fatal: Unable to create 'C:/Users/Name/go/src/github.com/aws/aws-lambda-go/.git/ORIG_HEAD.lock': File 
exists.

If no other git process is currently running,this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
package github.com/aws/aws-lambda-go/cmd/build-lambda-zip: exit status 128

有人经历过吗?或者知道该怎么做?

提前致谢

解决方法

原来是一个错误 - 将被修复。更多详细信息,请参见以下内容:

https://github.com/aws-amplify/amplify-cli/issues/6679

https://github.com/aws-amplify/amplify-cli/issues/6693