I am following https://docs.nodebb.org/installing/cloud/heroku/#keeping-it-up-to-date to install on Heroku. And at the step
./nodebb setup
It's said that
#...
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.0/libvips-8.7.0-darwin-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=12.16.1 runtime=node arch=x64 libc= platform=darwin)
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
In file included from ../src/common.cc:27:
../src/common.h:78:20: error: no member named 'Handle' in namespace 'v8'
bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
#...
It seems because the node version I use is 12
and according to https://github.com/lovell/sharp/issues/1683, node 12 removes namespace v8. Unless sharp is upated per https://github.com/lovell/sharp/issues/1683#issuecomment-497553995, we need to make sure the node version needs to be <12
I changed to use node 10
, and it works.
This issue is technically resolved in NodeBB v1.13.2