在我登錄serverless account后我嘗試部署我的應用程式(在亞馬遜上),它向我顯示了這個錯誤
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
這個怎么解決?
uj5u.com熱心網友回復:
如果您使用無服務器框架進行部署,根據檔案,當您要安裝serverless-python-requirements時,您必須先在終端上使用此行serverless plugin install -n serverless-python-requirements。這會自動將插件添加到專案的 package.json 和 serverless.yml 的 plugins 部分。您不必手動執行此操作,因為您可能會在此程序中犯任何錯誤。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/415545.html
標籤:
下一篇:找不到ECS的最小/最大任務值
