在我登录我的无服务器账户
后,尝试在亚马逊上部署我的应用程序时,它显示了这个错误。
Error: `docker run --rm -v C:/Users/user/AppData/Local/UnitedIncome/serverless-python-requirements/Cache/3c5307946d60c3cf6dcd718de08a5ac453454387e6a435435edf993f360200a547cc_x86_64_slspyc:/var/task:z -v C:/Users/user/AppDa
ta/Local/UnitedIncome/serverless-python-requirements/Cache/downloadCacheslspyc:/var/useDownloadCache:z -u 0 lambci/lambda:build-python3.8 python -m pip install -t /var/task/ -r /var/task/requirements.txt --cache-dir /var/useDownload
Cache` Exited with code 1
at ChildProcess.<anonymous> (C:\Users\user\Desktop\voice-reckognition\node_modules\child-process-ext\spawn.js:38:8)
at ChildProcess.emit (node:events:390:28)
at ChildProcess.emit (node:domain:475:12)
at ChildProcess.cp.emit (C:\Users\user\Desktop\voice-reckognition\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1064:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
我的应用程序使用Python编写,我已经安装了serverless-python-requirements
并在我的package.json
中配置如下:
"devDependencies": {
"serverless-python-requirements": "^5.3.0"
}
在我的serverless.yml
文件中,我有以下内容:
plugins:
- serverless-python-requirements
custom:
pythonRequirements:
dockerizePip: non-linux
如何解决这个问题?
docker run
显示的错误信息意味着serverless-python-requirements
已经被安装并且正在使用。 - Carl Walsh