javascript-algorithms
javascript-algorithms copied to clipboard
Error: node-canvas was built without JPEG support
This error occurd when I was running the file
src/algorithms/image-processing/seam-carving/tests/resizeImageWidth.test.js
at Object.<anonymous> (~/javascript-algorithms-master/src/algorithms/image-processing/seam-carving/__tests__/resizeImageWidth.test.js:45:7)
describe('resizeImageWidth', () => {
it('should perform content-aware image width reduction', () => {
// @see: https://jestjs.io/docs/asynchronous
return Promise.all([
loadImage(testImageBeforePath), // ERROR at this line !!!
loadImage(testImageAfterPath),
]).then(([imgBefore, imgAfter]) => {
// Original image.
// ...
});
});
});
Do I need to reinstall canvas?