You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Behavior
After running a handler, that invokes node-canvas once, the second and subsequent invocations gives a module did not self-register error. This gets fixed if I restart serverless offline
ANY /api/generate-canvas (λ: api)
✖ Unhandled exception in handler 'api'.
✖ Error: Module did not self-register: '/dev/serverless/node_modules/canvas/build/Release/canvas.node'.
Bug Report
This is mainly to make this issue easy to google, and cross link with the canvas node not supporting worker_threads ticket. Similar to sharp module not registering issue.
Current Behavior
After running a handler, that invokes node-canvas once, the second and subsequent invocations gives a module did not self-register error. This gets fixed if I restart serverless offline
Environment
canvas
version: [2.11.0]serverless
version: [3.31.0serverless-offline
version: [12.0.4]node.js
version: [v18.16.0]OS
: [Ubuntu 22.04]Possible Solution
Worker threads not supported in canvas, need to switch to inProcess. This does mean hot reloading handlers doesn't work anymore, unfortunate.
Run serverless offline with the flag:
--useInProcess
.Eg
serverless offline start --useInProcess
The text was updated successfully, but these errors were encountered: