gemini-testing / png-img

Lite libpng wrapper for node.js
MIT License
29 stars 13 forks source link

Includes header for std::runtime_error #60

Closed kaineer closed 3 years ago

kaineer commented 3 years ago

Why

In node 14.17.3 on PopOS, got compilation error:

$ npm i -DE png-img
...
npm ERR! ../src/PngImg.cc: In member function ‘void PngImg::InitStorage_()’:
npm ERR! ../src/PngImg.cc:71:20: error: ‘runtime_error’ is not a member of ‘std’
npm ERR!    71 |         throw std::runtime_error("Image is too large to allocate single buffer");
npm ERR!       |                    ^~~~~~~~~~~~~
npm ERR! make: *** [png_img.target.mk:118: Release/obj.target/png_img/src/PngImg.o] Error 1

Looks like stdexcept header file inclusion is missing.

What

Adds #include <stdexcept> and makes png-img to compile.

xrsd commented 3 years ago

I've merged the same code of @ruslansagitov just several minutes ago :-)

And published 3.3.1 version.

https://github.com/gemini-testing/png-img/pull/59/files

Anyway, thanks a lot for collaboration!

kaineer commented 3 years ago

Thanks for fixed version, I'll try it soon

xrsd commented 3 years ago

The only problem left – is why prebuild binaries weren't built and attached to new version in github when I published new version. Investigating this right now.

kaineer commented 3 years ago

3.3.1 fixes my problem, so I remove branch and repo.