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

Installation in node 0.12.2 fails (OS X)

Open hdn8 opened this issue 9 years ago • 7 comments

Failed during nodegyp rebuild:

make: *** [Release/obj.target/base64/base64.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.1.1
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/[redacted]/node_modules/base64
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm ERR! Darwin 14.1.1
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1

After reverting to node v0.10.38 the install worked fine.

hdn8 avatar Apr 13 '15 16:04 hdn8

  • OS X Mavericks.
  • NPM 2.9.1
  • Node 0.12.2
$ npm install --save-dev base64
\
> [email protected] install /Users/rafael/code/app/node_modules/base64
> node-gyp rebuild

  CXX(target) Release/obj.target/base64/base64.o
../base64.cc:13:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/rafael/.node-gyp/0.12.2/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../base64.cc:14:52: error: no member named 'New' in 'v8::String'
    return ThrowException(Exception::Error(String::New(msg)));
                                           ~~~~~~~~^
../base64.cc:122:29: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
base64_encode_binding(const Arguments &args)
                            ^~~~~~~~~
                            v8::internal::Arguments
/Users/rafael/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared
      here
class Arguments;
      ^
../base64.cc:124:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/rafael/.node-gyp/0.12.2/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../base64.cc:127:13: error: member access into incomplete type 'const v8::internal::Arguments'
    if (args.Length() != 1)
            ^
/Users/rafael/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: forward declaration of
      'v8::internal::Arguments'
class Arguments;
      ^
../base64.cc:130:33: error: type 'const v8::internal::Arguments' does not provide a subscript
      operator
    if (Buffer::HasInstance(args[0])) {
                            ~~~~^~
../base64.cc:131:45: error: type 'const v8::internal::Arguments' does not provide a subscript
      operator
        v8::Handle<v8::Object> buffer = args[0]->ToObject();
                                        ~~~~^~
../base64.cc:137:18: error: type 'const v8::internal::Arguments' does not provide a subscript
      operator
    else if (args[0]->IsString()) {
             ~~~~^~
../base64.cc:138:38: error: type 'const v8::internal::Arguments' does not provide a subscript
      operator
        String::Utf8Value v8str (args[0]->ToString());
                                 ~~~~^~
../base64.cc:144:33: error: no member named 'New' in 'v8::String'
    Local<String> ret = String::New(str);
                        ~~~~~~~~^
../base64.cc:146:18: error: no member named 'Close' in 'v8::HandleScope'
    return scope.Close(ret);
           ~~~~~ ^
../base64.cc:150:29: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
base64_decode_binding(const Arguments &args)
                            ^~~~~~~~~
                            v8::internal::Arguments
/Users/rafael/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared
      here
class Arguments;
      ^
../base64.cc:152:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/rafael/.node-gyp/0.12.2/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../base64.cc:155:13: error: member access into incomplete type 'const v8::internal::Arguments'
    if (args.Length() < 1)
            ^
/Users/rafael/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: forward declaration of
      'v8::internal::Arguments'
class Arguments;
      ^
../base64.cc:160:33: error: type 'const v8::internal::Arguments' does not provide a subscript
      operator
    if (Buffer::HasInstance(args[0])) { // buffer
                            ~~~~^~
../base64.cc:161:45: error: type 'const v8::internal::Arguments' does not provide a subscript
      operator
        v8::Handle<v8::Object> buffer = args[0]->ToObject();
                                        ~~~~^~
../base64.cc:170:17: error: no member named 'AsciiValue' in 'v8::String'
        String::AsciiValue b64data(args[0]->ToString());
        ~~~~~~~~^
../base64.cc:171:34: error: use of undeclared identifier 'b64data'
        decoded = base64_decode(*b64data, b64data.length(), &outlen);
                                 ^
../base64.cc:174:13: error: member access into incomplete type 'const v8::internal::Arguments'
    if (args.Length() > 1 && args[1]->IsString()) {
            ^
/Users/rafael/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: forward declaration of
      'v8::internal::Arguments'
class Arguments;
      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/base64/base64.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rafael/code/app/node_modules/base64
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "--save-dev" "base64"
npm ERR! node v0.12.2
npm ERR! npm  v2.9.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the base64 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls base64
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/rafael/code/app/npm-debug.log

rebelliard avatar May 15 '15 17:05 rebelliard

This occurs with me as well. :+1:

Nodejs: 0.12.2 NPM: 2.7.5

Tried to install 2.1.0 version of this module.

poliveira89 avatar Jun 08 '15 19:06 poliveira89

Same. Had to revert to an older version of Node.

brandonweiss avatar Jun 09 '15 21:06 brandonweiss

Same Issue for me

mienaikoe avatar Jun 18 '15 17:06 mienaikoe

Me too.

somerandomsequence avatar Jul 08 '15 19:07 somerandomsequence

As the author said in the readme.txt : "this module may no longer be necessary as nodejs includes its own base64 encoding/decoding functions"

Look here to use Node.js's functions : http://stackoverflow.com/a/6182519

afrantz avatar Jul 20 '15 14:07 afrantz

I have resolved this issue by using older version of node v0.10.40

prasanth-cubettech avatar Oct 28 '15 10:10 prasanth-cubettech