javascript-algorithms icon indicating copy to clipboard operation
javascript-algorithms copied to clipboard

Error: node-canvas was built without JPEG support

Open cc4393c opened this issue 4 years ago • 6 comments

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?

cc4393c avatar Aug 28 '21 10:08 cc4393c