调用服务云 Cannot find module 'wx-server-sdk,哪位大神帮解答下?
发布于 5 年前 作者 xiulanyu 3985 次浏览 来自 官方Issues

[云函数] [login] 调用失败 Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID 093464ca-8033-11eb-8732-525400742e8d, cloud function service error code -504002, error message Runtime.ImportModuleError: Error: Cannot find module ‘wx-server-sdk’

    at Object.module.exports.load (:18859/var/runtime/node10/UserFunction.js:35)

    at Runtime.handleOnce (:18859/var/runtime/node10/Runtime.engine.js:95)

    at Timeout.setTimeout [as _onTimeout] (:18859/var/runtime/node10/Runtime.engine.js:54)

    at ontimeout (:18859/appservice/timers.js:436)

    at tryOnTimeout (:18859/appservice/timers.js:300)

    at listOnTimeout (:18859/appservice/timers.js:263)

    at Timer.processTimers (:18859/appservice/timers.js:223); at cloud.callFunction api; 

    at new g (VM66 WAService.js:2)

    at c (VM66 WAService.js:2)

    at I (VM66 WAService.js:2)

    at Function.success (VM66 WAService.js:2)

    at C (VM66 WAService.js:2)

    at VM66 WAService.js:2

    at u (VM66 WAService.js:2)

    at Function.<anonymous> (VM66 WAService.js:2)

    at C (VM66 WAService.js:2)

    at VM66 WAService.js:2

fail @ index.js? [sm]:68

C @ VM66 WAService.js:2

(anonymous) @ VM66 WAService.js:2

(anonymous) @ VM66 WAService.js:2

r @ VM66 WAService.js:2

(anonymous) @ VM66 WAService.js:2

r @ VM66 WAService.js:2

s @ VM66 WAService.js:2

(anonymous) @ VM66 WAService.js:2

Promise.catch (async)

(anonymous) @ VM66 WAService.js:2

exportAPI.<computed> @ VM66 WAService.js:2

l.<computed> @ VM66 WAService.js:2

onGetOpenid @ index.js? [sm]:57

n.safeCallback @ VM66 WAService.js:2

(anonymous) @ VM66 WAService.js:2

a @ VM66 WAService.js:2

(anonymous) @ VM66 WAService.js:2

n @ VM66 WAService.js:2

(anonymous) @ VM66 WAService.js:2

(anonymous) @ VM66 WAService.js:2

i @ VM9 asdebug.js:1

c @ VM9 asdebug.js:1

(anonymous) @ VM9 asdebug.js:1

f @ VM9 asdebug.js:1

g @ VM9 asdebug.js:1

(anonymous) @ VM9 asdebug.js:1

_ws.onmessage @ VM9 asdebug.js:1

1 回复

上传云函数的时候选择云端安装依赖

回到顶部