Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID ed971364-7b8d-46b0-b644-c2bd52a02255, cloud function service error code -504002, error message Runtime.ImportModuleError: Error: Cannot find module 'wx-server-sdk' Require stack: - /var/user/index.js - /var/runtime/node12/UserFunction.js - /var/runtime/node12/Runtime.engine.js - /var/runtime/node12/bootstrap.js at Object.module.exports.load (:55907/var/runtime/node12/UserFunction.js:34) at Runtime.handleOnce (:55907/var/runtime/node12/Runtime.engine.js:99) at Timeout._onTimeout (:55907/var/runtime/node12/Runtime.engine.js:56) at listOnTimeout (:55907/appservice/internal/timers.js:549) at processTimers (:55907/appservice/internal/timers.js:492); at cloud.callFunction api; at new t (WASubContext.js?t=wechat&s=1686489830072&v=2.14.1:17) at u (WASubContext.js?t=wechat&s=1686489830072&v=2.14.1:17) at l (WASubContext.js?t=wechat&s=1686489830072&v=2.14.1:17) at Function.success (WASubContext.js?t=wechat&s=1686489830072&v=2.14.1:17) at f (WASubContext.js?t=wechat&s=1686489830072&v=2.14.1:2) at WASubContext.js?t=wechat&s=1686489830072&v=2.14.1:2 at f (WASubContext.js?t=wechat&s=1686489830072&v=2.14.1:26) at Function.<anonymous> (WASubContext.js?t=wechat&s=1686489830072&v=2.14.1:26) at f (WASubContext.js?t=wechat&s=1686489830072&v=2.14.1:2) at WASubContext.js?t=wechat&s=1686489830072&v=2.14.1:2
时间: 2024-03-26 16:37:41 浏览: 412
这个错误提示显示了云函数在执行时出现了错误,具体的错误信息是:在执行云函数时,运行时出现了导入模块错误,无法找到模块 'wx-server-sdk',这个错误导致了整个云函数的执行失败。根据错误提示来看,是因为代码中引用了 'wx-server-sdk' 模块,但是在运行时发现该模块不存在,导致了错误的发生。建议您检查代码中是否正确引用了相关的依赖模块,或者是否有缺失依赖的情况。
相关问题
admin.js:108 Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID 9800d05e-bd18-4f3b-98ea-7629de2b99ab, cloud function service error code -504002, error message ReferenceError: wx is not defined
这个错误的提示显示在 admin.js 文件的第 108 行,报错信息是:errCode: -404011,errMsg: cloud.callFunction:fail requestID 9800d05e-bd18-4f3b-98ea-7629de2b99ab, cloud function service error code -504002, error message ReferenceError: wx is not defined。
根据错误信息来看,这个错误是由于在 admin.js 文件的第 108 行中使用了一个未定义的变量 wx 导致的。请检查该行代码,确保变量 wx 已经正确定义,并且所需的依赖库已经正确引入。另外,也可以确认一下云函数的调用是否正确,以及相关的配置是否正确设置。
cloud.callFunction:fail Error: errCode: -504002 functions execute fail | errMsg: ReferenceError: wx is not defined
这个错误的原因是在调用 cloud.callFunction 函数时出现了问题。根据错误信息,可以看到错误代码 errCode: -504002,错误信息是 "functions execute fail"。具体的错误是 "ReferenceError: wx is not defined",这表示在调用函数时,wx 对象未定义。
根据错误信息分析,可能是在调用 cloud.callFunction 函数之前没有正确引入 wx 对象或者相关的依赖文件。请检查代码中是否正确引入了 wx 对象,并确保该对象在调用函数之前已被正确初始化。
另外,也可以检查一下函数的调用方式是否正确,确保传递给 cloud.callFunction 函数的参数是有效的。
如果问题仍然存在,可以提供更多的代码片段或上下文信息,以便更好地理解问题并给出更准确的解答。
阅读全文
相关推荐
















