【微信小程序】[云函数] [login] 调用失败 Error: errCode: -404011 cloud function execution error

云函数] [login] 调用失败 Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail cloud function service error code -501005, error message Environment not found; at cloud.callFunction api; 
at new t (WAService.js:22)
at o (WAService.js:22)
at Object.i [as returnAsFinalCloudSDKError] (WAService.js:22)
at Function.success (WAService.js:21)
at Object.success (WAService.js:4)
at L.<anonymous> (WAService.js:7)
at L.emit (WAService.js:8)
at Function.<anonymous> (WAService.js:12)
at WAService.js:6
at n (appservice?t=1564365122173:1395 __

本地调试小程序登录时报错,原因是未创建[login]云函数。

解决办法:

1、打开微信开发者工具 - 云开发 - 云函数

2、创建函数名为:login 的函数即可。

原文地址:https://www.cnblogs.com/hunttown/p/13030671.html