VM473:1 Uncaught (in promise) thirdScriptError
errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID b07cf7a0-9957-11ea-8093-525400f41496, cloud function service error code -504002, error message ReferenceError: wx is not defined
at Object.<anonymous> (/var/user/index.js:4:12)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.module.exports.load (/var/runtime/node10/UserFunction.js:22:19)
at Runtime.handleOnce (/var/runtime/node10/Runtime.engine.js:84:38); at cloud.callFunction api;
Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID b07cf7a0-9957-11ea-8093-525400f41496, cloud function service error code -504002, error message ReferenceError: wx is not defined
更新开发者工具到最新版本,开启本地调试再看看。
https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/functions/local-debug.html
wx is not defined,wx两个字不能出现在云函数里