rsmbl / Resemble.js

Image analysis and comparison

Home Page:http://rsmbl.github.io/Resemble.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

canvas-prebuilt is a breaking change

davidmsibley opened this issue · comments

I haven't gotten the current version to work on my machine, due to the switch to canvas-prebuilt: 3f13b6c#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R32

The first problem I encountered was that node couldn't find canvas-prebuilt, because it's only included in devDependencies. Because it's being required in the distributed code it should be in either dependencies or peerDependencies.

After changing my project to pull in canvas-prebuilt instead of canvas, I started encountering Error: libpng12.so.0: cannot open shared object file: No such file or directory. I haven't looked in to why yet.

Instead I reverted my package.json and reverted the two require('canvas-prebuilt') to require('canvas') in my node_modules/resemblejs/resemble.js and it works as intended.

canvas-prebuilt is now a dependency rather than devDependency as of v2.7.0.

As for the libpng12.so.0 error, possibly this node-gfx/node-canvas-prebuilt#15 ?

Awesome!

Could be. I've got a feeling that the libpng12.so.0 thing was me not setting up headless chrome correctly, but I haven't gone back to check that yet.