我正在使用 serverless-finch 插件进行无服务器客户端部署。我的配置如下:
service: myservice
frameworkVersion: '3'
plugins:
- serverless-finch
custom:
client:
bucketName: xyz.com
distributionFolder: client/xyz.com/dist/browser/
indexDocument: index.html
errorDocument: index.html
当我尝试使用 sls client deploy
部署我的客户端
(Angular 6)时,我收到此错误:
Warning: Invalid configuration encountered
at 'provider.lambdaHashingVersion': must be equal to one of the allowed values [20200924, 20201221]
Learn more about configuration validation here: http://slss.io/configuration-validation
This deployment will:
- Upload all files from 'client/xyz.com/dist/browser/' to bucket 'xyz.com' undefined
- Set (and overwrite) bucket 'xyz.com' configuration
- Set (and overwrite) bucket 'xyz.com' bucket policy
- Set (and overwrite) bucket 'xyz.com' CORS policy
Environment: darwin, node 12.13.0, framework 3.2.1, plugin 6.0.0, SDK 4.3.1
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
TypeError: (intermediate value).run is not a function
2 deprecations found: run 'serverless doctor' for more details
从这个简短的错误描述中找不到任何线索:
Error:
TypeError: (intermediate value).run is not a function
我已经使用
sudo ng build --prod
构建了我的角度项目,并且 dist 文件夹没问题,我可以在本地运行它,没有任何问题。手动上传 dist 文件夹到 s3 也运行良好。但无法使用 serverless client deploy
命令部署它。
有人可以帮忙吗?
对于任何像我一样搜索相同错误的未来人,解决方案是运行:
serverless client deploy --no-confirm
该插件的代码提示进行交互式确认似乎不适用于某些无服务器框架版本的组合。