使用 nssm 服务管理器运行节点应用程序时,不会加载画布模块,但从命令行运行应用程序时会加载。
该服务运行在win7/32位,node版本为10.16,canvas版本为2.5。
Error: The specified module could not be found.
\\?\C:\Program
Files\nodejs\node_modules\canvas\build\Release\canvas.node
at Object.Module._extensions..node
(internal/modules/cjs/loader.js:805:18)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (C:\Program
Files\nodejs\node_modules\canvas\lib\bindings.js:3:18)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js
(internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
(node:7820) [DEP0005] DeprecationWarning: Buffer() is deprecated due
to security and usability issues