i've project that have electron forge (building desktop app) also library for pdfjs-dist i know that pdfjs-dist library required canvas to run it. My problem appeared whenever i tried to include this library and build with electron forge. it will have some error on rebuild & build process at node-gyp canvas. × Rebuild Failed An unhandled error occurred inside electron-rebuild node-gyp failed to rebuild 'C:\Users\rikim\Documents\appangular\oneapp-ui\node_modules\canvas' Error: node-gyp failed to rebuild 'C:\Users\rikim\Documents\appangular\oneapp-ui\node_modules\canvas' at ChildProcess. (C:\Users\rikim\Documents\appangular\oneapp-ui\node_modules@electron\rebuild\lib\module-type\node-gyp\node-gyp.js:121:24) at ChildProcess.emit (node:events:517:28) at ChildProcess._handle.onexit (node:internal/child_process:292:12) But when i exclude the pdfjs-dist. then can rebuild without an issue Run npm audit for details. √ Rebuild Complete My question, is there anyway i can make this works, without excluding pdfjs-dist ? Thanks, i need to know the alternative solution also Continue reading...