云函数是在本地安装了依赖然后上传,目录结构如下:
-node_modules
- index.js
- package.json
云端日志错误:
2022-07-18T09:58:43.20Z ERROR RequestId:bd9aed79-045e-43ef-9f90-e73603d3fdbc Result:{"errCode":1,"errMsg":"user code exception caught","stackTrace":"Cannot find module '../build/Release/canvas.node'
Error: Cannot find module '../build/Release/canvas.node'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.\u003canonymous\u003e (/var/user/node_modules/canvas/lib/bindings.js:3:18)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)"}
请问该如何解决?
1 个回复
DCloud_uniCloud_WYQ
暂不支持使用包含.node这种二进制文件的node包。