node-png icon indicating copy to clipboard operation
node-png copied to clipboard

Fails to build

Open mirek opened this issue 10 years ago • 3 comments

mirekimac:pngtest mirek$ node -v
v0.12.0
mirekimac:pngtest mirek$ npm install png --save
child_process: customFds option is deprecated, use stdio instead.
  CXX(target) Release/obj.target/png/src/common.o
../src/common.cpp:10:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/mirek/.node-gyp/0.12.0/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../src/common.cpp:11:37: error: no member named 'New' in 'v8::String'
    return Exception::Error(String::New(msg));
                            ~~~~~~~~^
../src/common.cpp:16:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/mirek/.node-gyp/0.12.0/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../src/common.cpp:17:12: error: use of undeclared identifier 'ThrowException'; did you mean 'ErrorException'?
    return ThrowException(ErrorException(msg));
           ^~~~~~~~~~~~~~
           ErrorException
../src/common.cpp:8:1: note: 'ErrorException' declared here
ErrorException(const char *msg)
^
../src/common.cpp:17:27: error: no viable conversion from 'Handle<v8::Value>' to 'const char *'
    return ThrowException(ErrorException(msg));
                          ^~~~~~~~~~~~~~~~~~~
../src/common.cpp:8:28: note: passing argument to parameter 'msg' here
ErrorException(const char *msg)
                           ^
5 errors generated.
make: *** [Release/obj.target/png/src/common.o] Error 1

mirek avatar Feb 13 '15 03:02 mirek

Oh, I get this one too! I use:

  1. node 0.12.0
  2. npm 2.5.1
  3. OSX 10.9.5
  4. gcc Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)

Anything else I can provide to help?

hrdwdmrbl avatar Mar 24 '15 16:03 hrdwdmrbl

If I drop back to using v0.10.37, then it works again. So, to anyone else with this problem, I would recommend using NVM to install and then use v0.10.37, install png, then switch back to 0.11.x or 0.12.x and run npm install again. It will pass, and you can continue on.

hrdwdmrbl avatar Mar 24 '15 17:03 hrdwdmrbl

Not fixed yet for most recent versions of node?

brunobasto avatar Nov 26 '16 01:11 brunobasto