简单的云函数,本地调试通过 云端调试失败 为啥?
函数
const cloud = require('wx-server-sdk')
cloud.init({
env: cloud.DYNAMIC_CURRENT_ENV
})
// 云函数入口函数
exports.main = async (event, context) => {
return {
sum: event.key1 + event.key2
}
}
报错信息:
求解答
补充:本地小程序调用报错信息
errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID cd0aeb41-d2ce-11ea-95d7-5254000505e4, cloud function service error code -504002, error message user’s issue failed:kFileNotExist; at cloud.callFunction api;