Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install fails. #3

Open
ranadeep47 opened this issue Feb 23, 2014 · 12 comments
Open

npm install fails. #3

ranadeep47 opened this issue Feb 23, 2014 · 12 comments

Comments

@ranadeep47
Copy link

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:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:104:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:862:12)
gyp ERR! System Linux 3.11.0-12-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/devd/Documents/capture/node_modules/socketwatcher
gyp ERR! node -v v0.11.10
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.

Is what im getting when try to install it

@jmaxxz
Copy link

jmaxxz commented Mar 25, 2014

Same issue. Any progress?

@ujjwalt
Copy link

ujjwalt commented Mar 27, 2014

Not happening to me! Weird!

@btrask
Copy link
Owner

btrask commented Apr 1, 2014

Might be a problem with Node 0.11.x?

@jmaxxz
Copy link

jmaxxz commented Apr 2, 2014

@btrask using node v0.10.22 so that seems pretty unlikely 😉

Updated to v0.10.26 and see the same issue.

@jwarkentin
Copy link

As @btrask mentioned, I think the node version is the key. I was having this problem and after switching from node 0.11.13 to 0.10.28 it worked for me.

@junekhan
Copy link

@jwarkentin I do the same as you did, but nothing changes.

@kriskowal
Copy link

Observed in the wild on Linux:

make: Entering directory `/mnt/jenkins/workspace/ELIDED/pcap/node_modules/socketwatcher/build'
  CXX(target) Release/obj.target/socketwatcher/socket_watcher.o
In file included from ../socket_watcher.hpp:8:0,
                 from ../socket_watcher.cpp:5:
../../nan/nan.h:74:47: fatal error: nan_new.h: No such file or directory
compilation terminated.
make: *** [Release/obj.target/socketwatcher/socket_watcher.o] Error 1
make: Leaving directory `/mnt/jenkins/workspace/ELIDED/node_modules/socketwatcher/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node0.10/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.2.0-74-generic
gyp ERR! command "node" "/usr/lib/node0.10/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /mnt/jenkins/workspace/ELIDED/socketwatcher
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 

@kriskowal
Copy link

Experiencing this build failure non-deterministically. Occurs about 1 in 3 times.

@lfender6445
Copy link

appears to work just fine with node v0.10.26 and node v0.10.32

  • failed install for the following versions:
v0.12.0
v4.0.0

full npm err:

› nvm use v4.0.0
Now using node v4.0.0
› npm install
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
-
> [email protected] install /Users/lfender/source/snapshot/node_modules/pcap/node_modules/socketwatcher
> node-gyp rebuild

  CXX(target) Release/obj.target/socketwatcher/socket_watcher.o
In file included from ../socket_watcher.cpp:4:
../socket_watcher.hpp:7:36: error: expected class name
class SocketWatcher : public node::ObjectWrap {
                                   ^
../socket_watcher.hpp:14:9: error: unknown type name 'uv_poll_t'
        uv_poll_t* poll_;
        ^
../socket_watcher.hpp:18:48: error: no type named 'Arguments' in namespace 'v8'; did
      you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> New(const v8::Arguments & args);
                                               ^~~~~~~~~~~~~
                                               v8::internal::Arguments
/Users/lfender/.node-gyp/4.0.0/include/node/v8.h:139:7: note:
      'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../socket_watcher.cpp:4:
../socket_watcher.hpp:19:48: error: no type named 'Arguments' in namespace 'v8'; did
      you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> Set(const v8::Arguments & args);
                                               ^~~~~~~~~~~~~
                                               v8::internal::Arguments
/Users/lfender/.node-gyp/4.0.0/include/node/v8.h:139:7: note:
      'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../socket_watcher.cpp:4:
../socket_watcher.hpp:20:50: error: no type named 'Arguments' in namespace 'v8'; did
      you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> Start(const v8::Arguments& args);
                                                 ^~~~~~~~~~~~~
                                                 v8::internal::Arguments
/Users/lfender/.node-gyp/4.0.0/include/node/v8.h:139:7: note:
      'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../socket_watcher.cpp:4:
../socket_watcher.hpp:21:49: error: no type named 'Arguments' in namespace 'v8'; did
      you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> Stop(const v8::Arguments& args);
                                                ^~~~~~~~~~~~~
                                                v8::internal::Arguments
/Users/lfender/.node-gyp/4.0.0/include/node/v8.h:139:7: note:
      'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../socket_watcher.cpp:4:
../socket_watcher.hpp:25:30: error: unknown type name 'uv_poll_t'
        static void Callback(uv_poll_t *w, int status, int events);
                             ^
../socket_watcher.cpp:39:31: error: unknown type name 'Arguments'; did you mean
      'v8::internal::Arguments'?
Handle<Value> Calleback(const Arguments& args) {
                              ^~~~~~~~~
                              v8::internal::Arguments
/Users/lfender/.node-gyp/4.0.0/include/node/v8.h:139:7: note:
      'v8::internal::Arguments' declared here
class Arguments;
      ^
../socket_watcher.cpp:40:12: error: no matching function for call to 'Undefined'
    return Undefined();
           ^~~~~~~~~
/Users/lfender/.node-gyp/4.0.0/include/node/v8.h:315:27: note: candidate function not
      viable: requires single argument 'isolate', but no arguments were provided
  friend Local<Primitive> Undefined(Isolate* isolate);
                          ^
../socket_watcher.cpp:47:55: error: cannot initialize a parameter of type
      'v8::Isolate *' with an lvalue of type 'v8::Handle<v8::Value> (const
      v8::internal::Arguments &)'
    Local<FunctionTemplate> t = FunctionTemplate::New(New);
                                                      ^~~
/Users/lfender/.node-gyp/4.0.0/include/node/v8.h:4350:16: note: passing argument to
      parameter 'isolate' here
      Isolate* isolate, FunctionCallback callback = 0,
               ^
../socket_watcher.cpp:49:29: error: no member named 'NewSymbol' in 'v8::String'
    t->SetClassName(String::NewSymbol("SocketWatcher"));
                    ~~~~~~~~^
../socket_watcher.cpp:52:41: error: cannot initialize a parameter of type
      'v8::FunctionCallback' (aka 'void (*)(const FunctionCallbackInfo<v8::Value> &)')
      with an lvalue of type
      'v8::Handle<v8::Value> (const v8::internal::Arguments &)': type mismatch at 1st
      parameter ('const FunctionCallbackInfo<v8::Value> &' vs 'const
      v8::internal::Arguments &')
    NODE_SET_PROTOTYPE_METHOD(t, "set", SocketWatcher::Set);
                                        ^~~~~~~~~~~~~~~~~~
/Users/lfender/.node-gyp/4.0.0/include/node/node.h:254:60: note: passing argument to
      parameter 'callback' here
                                      v8::FunctionCallback callback) {
                                                           ^
../socket_watcher.cpp:53:43: error: address of overloaded function 'Start' does not
      match required type 'void (const v8::FunctionCallbackInfo<v8::Value> &)'
    NODE_SET_PROTOTYPE_METHOD(t, "start", SocketWatcher::Start);
                                          ^~~~~~~~~~~~~~~~~~~~
../socket_watcher.hpp:20:38: note: candidate function has type mismatch at 1st
      parameter (expected 'const v8::FunctionCallbackInfo<v8::Value> &' but has 'const
      v8::internal::Arguments &')
        static v8::Handle<v8::Value> Start(const v8::Arguments& args);
                                     ^
../socket_watcher.hpp:23:14: note: candidate function has different number of
      parameters (expected 1 but has 0)
        void Start();
             ^
/Users/lfender/.node-gyp/4.0.0/include/node/node.h:254:60: note: passing argument to
      parameter 'callback' here
                                      v8::FunctionCallback callback) {
                                                           ^
../socket_watcher.cpp:54:42: error: address of overloaded function 'Stop' does not
      match required type 'void (const v8::FunctionCallbackInfo<v8::Value> &)'
    NODE_SET_PROTOTYPE_METHOD(t, "stop", SocketWatcher::Stop);
                                         ^~~~~~~~~~~~~~~~~~~
../socket_watcher.hpp:21:38: note: candidate function has type mismatch at 1st
      parameter (expected 'const v8::FunctionCallbackInfo<v8::Value> &' but has 'const
      v8::internal::Arguments &')
        static v8::Handle<v8::Value> Stop(const v8::Arguments& args);
                                     ^
../socket_watcher.hpp:24:14: note: candidate function has different number of
      parameters (expected 1 but has 0)
        void Stop();
             ^
/Users/lfender/.node-gyp/4.0.0/include/node/node.h:254:60: note: passing argument to
      parameter 'callback' here
                                      v8::FunctionCallback callback) {
                                                           ^
../socket_watcher.cpp:56:25: error: no member named 'NewSymbol' in 'v8::String'
    target->Set(String::NewSymbol("SocketWatcher"), t->GetFunction());
                ~~~~~~~~^
../socket_watcher.cpp:58:23: error: use of undeclared identifier 'NODE_PSYMBOL'
    callback_symbol = NODE_PSYMBOL("callback");
                      ^
../socket_watcher.cpp:61:42: error: unknown type name 'Arguments'; did you mean
      'v8::internal::Arguments'?
Handle<Value> SocketWatcher::Start(const Arguments& args) {
                                         ^~~~~~~~~
                                         v8::internal::Arguments
/Users/lfender/.node-gyp/4.0.0/include/node/v8.h:139:7: note:
      'v8::internal::Arguments' declared here
class Arguments;
      ^
../socket_watcher.cpp:62:17: error: calling a protected constructor of class
      'v8::HandleScope'
    HandleScope scope;
                ^
/Users/lfender/.node-gyp/4.0.0/include/node/v8.h:885:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../socket_watcher.cpp:63:30: error: use of undeclared identifier 'ObjectWrap'
    SocketWatcher *watcher = ObjectWrap::Unwrap<SocketWatcher>(args.Holder());
                             ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/socketwatcher/socket_watcher.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/lfender/.nvm/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.1.0
gyp ERR! command "/Users/lfender/.nvm/versions/node/v4.0.0/bin/node" "/Users/lfender/.nvm/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/lfender/source/snapshot/node_modules/pcap/node_modules/socketwatcher
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v3.0.1
gyp ERR! not ok
npm ERR! Darwin 14.1.0
npm ERR! argv "/Users/lfender/.nvm/versions/node/v4.0.0/bin/node" "/Users/lfender/.nvm/versions/node/v4.0.0/bin/npm" "install"
npm ERR! node v4.0.0
npm ERR! npm  v2.14.2
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 socketwatcher 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 socketwatcher
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/lfender/source/snapshot/npm-debug.log

@zachary822
Copy link

Still broken for CentOS 7


> [email protected] install /root/node_modules/socketwatcher
> node-gyp rebuild

make: Entering directory `/root/node_modules/socketwatcher/build'
  CXX(target) Release/obj.target/socketwatcher/socket_watcher.o
In file included from ../node_modules/nan/nan_new.h:190:0,
                 from ../node_modules/nan/nan.h:80,
                 from ../socket_watcher.hpp:8,
                 from ../socket_watcher.cpp:5:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static NanIntern::FactoryBase<v8::Signature>::return_t NanIntern::Factory<v8::Signature>::New(NanIntern::Factory<v8::Signature>::FTH, int, NanIntern::Factory<v8::Signature>::FTH*)’:
../node_modules/nan/nan_implementation_12_inl.h:181:76: error: no matching function for call to ‘v8::Signature::New(v8::Isolate*, NanIntern::Factory<v8::Signature>::FTH&, int&, NanIntern::Factory<v8::Signature>::FTH*&)’
   return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
                                                                            ^
../node_modules/nan/nan_implementation_12_inl.h:181:76: note: candidate is:
In file included from /root/.node-gyp/4.0.0/include/node/node.h:42:0,
                 from ../node_modules/nan/nan.h:24,
                 from ../socket_watcher.hpp:8,
                 from ../socket_watcher.cpp:5:
/root/.node-gyp/4.0.0/include/node/v8.h:4675:27: note: static v8::Local<v8::Signature> v8::Signature::New(v8::Isolate*, v8::Local<v8::FunctionTemplate>)
   static Local<Signature> New(
                           ^
/root/.node-gyp/4.0.0/include/node/v8.h:4675:27: note:   candidate expects 2 arguments, 4 provided
In file included from ../socket_watcher.hpp:8:0,
                 from ../socket_watcher.cpp:5:
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:171:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                         ^
../node_modules/nan/nan.h:166:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
                         ^
../node_modules/nan/nan.h:564:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../node_modules/nan/nan.h:564:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:568:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../node_modules/nan/nan.h:568:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:575:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../node_modules/nan/nan.h:575:67: note: candidates are:
In file included from ../node_modules/nan/nan.h:25:0,
                 from ../socket_watcher.hpp:8,
                 from ../socket_watcher.cpp:5:
/root/.node-gyp/4.0.0/include/node/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/root/.node-gyp/4.0.0/include/node/node_buffer.h:31:40: note:   no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/root/.node-gyp/4.0.0/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/root/.node-gyp/4.0.0/include/node/node_buffer.h:43:40: note:   no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../socket_watcher.hpp:8:0,
                 from ../socket_watcher.cpp:5:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:579:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
     return node::Buffer::New(v8::Isolate::GetCurrent(), size);
                                                             ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:586:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
make: *** [Release/obj.target/socketwatcher/socket_watcher.o] Error 1
make: Leaving directory `/root/node_modules/socketwatcher/build'
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:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.10.0-229.20.1.el7.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node_modules/socketwatcher
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1
npm WARN ENOENT ENOENT: no such file or directory, open '/root/package.json'
npm WARN EPACKAGEJSON root No description
npm WARN EPACKAGEJSON root No repository field.
npm WARN EPACKAGEJSON root No README data
npm WARN EPACKAGEJSON root No license field.

@toddpi314
Copy link

boom on Arch (latest) and node v0.12.0

@webdigi
Copy link

webdigi commented Nov 24, 2016

Had the same issue and nothing would work. Finally had to go to node 0.10.26 on the pi.

Used NVM instead of direct node install.

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
nvm install 0.10.26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests