achingbrain / pm2-web

A web based monitor for PM2
539 stars 90 forks source link

Install error on MacOSX and node 6.5 / 7.0 #57

Open subatomicglue opened 8 years ago

subatomicglue commented 8 years ago

npm --version 3.10.8 node --version v7.0.0

Errors:

sudo npm install -g pm2-web
Password:
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
/usr/local/bin/pm2-web -> /usr/local/lib/node_modules/pm2-web/bin/pm2-web.sh

> mdns2@2.1.4 install /usr/local/lib/node_modules/pm2-web/node_modules/mdns2
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/happyuser/.node-gyp/7.0.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/pm2-web/node_modules/mdns2/.node-gyp"
  CXX(target) Release/obj.target/dns_sd_bindings/src/dns_sd.o
In file included from ../src/dns_sd.cpp:5:
../src/mdns_utils.hpp:16:62: error: no member named 'New' in 'v8::String'
    return ThrowException( v8::Exception::Error( v8::String::New( message )));
                                                 ~~~~~~~~~~~~^
../src/mdns_utils.hpp:22:66: error: no member named 'New' in 'v8::String'
    return ThrowException( v8::Exception::TypeError( v8::String::New( message )));
                                                     ~~~~~~~~~~~~^
../src/mdns_utils.hpp:28:12: error: use of undeclared identifier 'ThrowException'
    return ThrowException(buildException(error_code));
           ^
../src/mdns_utils.hpp:31:1: error: 'inline' can only appear on functions
inline
^
../src/mdns_utils.hpp:33:37: error: expected ')'
argumentCountMismatch(v8::Arguments const& args, int expectedCount) {
                                    ^
../src/mdns_utils.hpp:33:22: note: to match this '('
argumentCountMismatch(v8::Arguments const& args, int expectedCount) {
                     ^
../src/mdns_utils.hpp:33:27: error: no member named 'Arguments' in namespace 'v8'
argumentCountMismatch(v8::Arguments const& args, int expectedCount) {
                      ~~~~^
../src/mdns_utils.hpp:33:68: error: expected ';' after top level declarator
argumentCountMismatch(v8::Arguments const& args, int expectedCount) {
                                                                   ^
                                                                   ;
In file included from ../src/dns_sd.cpp:6:
../src/dns_service_ref.hpp:8:33: error: expected class name
class ServiceRef : public node::ObjectWrap {
                                ^
../src/dns_service_ref.hpp:14: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
/usr/local/lib/node_modules/pm2-web/node_modules/mdns2/.node-gyp/7.0.0/include/node/v8.h:148:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/dns_sd.cpp:6:
../src/dns_service_ref.hpp:37:21: error: no type named 'AccessorInfo' in namespace 'v8'
                v8::AccessorInfo const& info);
                ~~~~^
../src/dns_service_ref.hpp:37:34: error: expected ')'
                v8::AccessorInfo const& info);
                                 ^
../src/dns_service_ref.hpp:36:47: note: to match this '('
        static v8::Handle<v8::Value> fd_getter(v8::Local<v8::String> property,
                                              ^
../src/dns_service_ref.hpp:39:21: error: no type named 'AccessorInfo' in namespace 'v8'
                v8::AccessorInfo const& info);
                ~~~~^
../src/dns_service_ref.hpp:39:34: error: expected ')'
                v8::AccessorInfo const& info);
                                 ^
../src/dns_service_ref.hpp:38:56: note: to match this '('
        static v8::Handle<v8::Value> initialized_getter(v8::Local<v8::String> property,
                                                       ^
In file included from ../src/dns_sd.cpp:7:
../src/txt_record_ref.hpp:6:35: error: expected class name
class TxtRecordRef : public node::ObjectWrap {
                                  ^
../src/txt_record_ref.hpp:12: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
/usr/local/lib/node_modules/pm2-web/node_modules/mdns2/.node-gyp/7.0.0/include/node/v8.h:148:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/dns_sd.cpp:7:
../src/txt_record_ref.hpp:19:40: error: member reference type 'v8::Persistent<v8::FunctionTemplate>' is not a pointer; did you mean to use '.'?
            return constructor_template->HasInstance( object );
                   ~~~~~~~~~~~~~~~~~~~~^~
                                       .
../src/txt_record_ref.hpp:19:42: error: no member named 'HasInstance' in 'v8::Persistent<v8::FunctionTemplate, v8::NonCopyablePersistentTraits<v8::FunctionTemplate> >'
            return constructor_template->HasInstance( object );
                   ~~~~~~~~~~~~~~~~~~~~  ^
In file included from ../src/dns_sd.cpp:9:
../src/socket_watcher.hpp:6:36: error: expected class name
class SocketWatcher : public node::ObjectWrap {
                                   ^
../src/socket_watcher.hpp:13:9: error: unknown type name 'uv_poll_t'
        uv_poll_t* poll_;
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.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:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 15.6.0
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 /usr/local/lib/node_modules/pm2-web/node_modules/mdns2
gyp ERR! node -v v7.0.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
/usr/local/lib
└── pm2-web@2.1.3 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: mdns2@2.1.4 (node_modules/pm2-web/node_modules/mdns2):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: mdns2@2.1.4 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
romanesko commented 7 years ago

I have the same problem

romanesko commented 7 years ago

It's a problem with mdns2 module

Please look at https://github.com/Wizcorp/node_mdns — they are recommending people switch back to https://github.com/agnat/node_mdns