有时用composer更新了第三方库后,访问接口报错如下:
{
errorCode: 1,
errorMessage: "Process exited before completing request",
statusCode: 439,
}
查看文档看不到什么的,可以去云函数后台看日志,会看到报错如下:
START RequestId:4e3bae45f7b3af3aa133dcf14dd57d57
Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.2.5". You are running 7.2.2. in /var/user/vendor/composer/platform_check.php on line 24
有了这个详细的报错信息,问题就好处理了。
处理方式如下:
composer update --ignore-platform-reqs
更新完成后,重新部署一下serverless就正常了。