使用nssm服务管理器运行节点应用程序时,canvas模块不会加载,但是从命令行运行该应用程序时会加载。
该服务以win7 / 32位运行,节点版本为10.16,画布版本为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