question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

node-gyp fails in node v0.11.x

See original GitHub issue

The build fails with a lot of errors like:

  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:23: error: no member named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
argumentCountMismatch(v8::Arguments const& args, int expectedCount) {
                      ^~~~
/Users/Gautham/.node-gyp/0.11.13/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/dns_sd.cpp:5:
../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
/Users/Gautham/.node-gyp/0.11.13/deps/v8/include/v8.h:149: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
/Users/Gautham/.node-gyp/0.11.13/deps/v8/include/v8.h:149: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; maybe you meant 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_;
        ^
../src/socket_watcher.hpp:17: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/Gautham/.node-gyp/0.11.13/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
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

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Jun 11, 2014

@GotEmB I had the same error and I could fix it by opening XCode which asked me then to install an update.

0reactions
agnatcommented, Nov 18, 2014

Released. Thanks everybody, for your help and your patience. Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NPM install fails with node-gyp - Stack Overflow
This node-gyp seems to be a never ending source of pain for us. At first it complained that it needed python, so we...
Read more >
node-gyp rebuild fail · Issue #247 - GitHub
hi I try to install soap in opensuse 12.3 , i have problem with this , gyp ERR! build error gyp ERR! stack...
Read more >
node-gyp - npm
node -gyp is a cross-platform command-line tool written in Node.js for compiling native addon modules for Node.js. It contains a vendored ...
Read more >
https://notendur.hi.is/~sthb6/vef/11/node_modules/...
3.0.1 - Use ~ in node-pre-gyp semver for more flexible dep management. ... Now supporting node v0.11.x (specifically >=0.11.13) - Fix db opening...
Read more >
node-gyp | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found