Can't install npm protagonist on OS X 10.9.5

I am trying to install protagonist on OS X via npm install protagonist

. However, this is not the case as shown below.

Any idea?

$node -v
v0.11.13
$npm -v
1.4.9

$npm install protagonist
npm http GET https://registry.npmjs.org/protagonist
npm http 304 https://registry.npmjs.org/protagonist

> protagonist@0.15.0 install /Users/Bruce/node_modules/protagonist
> node-gyp rebuild

  CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/CBlueprint.o
  CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/CSourceAnnotation.o
  CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/HTTP.o
  CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/Section.o
  CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/Serialize.o
  CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/SerializeJSON.o
  CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/SerializeYAML.o
  CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/Signature.o
  CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/snowcrash.o
  CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/csnowcrash.o
  CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/UriTemplateParser.o
  CXX(target) Release/obj.target/libsnowcrash/snowcrash/src/posix/RegexMatch.o
  LIBTOOL-STATIC Release/snowcrash.a
  CXX(target) Release/obj.target/libmarkdownparser/snowcrash/ext/markdown-parser/src/ByteBuffer.o
  CXX(target) Release/obj.target/libmarkdownparser/snowcrash/ext/markdown-parser/src/MarkdownNode.o
  CXX(target) Release/obj.target/libmarkdownparser/snowcrash/ext/markdown-parser/src/MarkdownParser.o
  LIBTOOL-STATIC Release/markdownparser.a
  CC(target) Release/obj.target/libsundown/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.o
  CC(target) Release/obj.target/libsundown/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.o
CC(target) Release/obj.target/libsundown/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.o
  CC(target) Release/obj.target/libsundown/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.o
  CC(target) Release/obj.target/libsundown/snowcrash/ext/markdown-parser/ext/sundown/src/stack.o
  CC(target) Release/obj.target/libsundown/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_href_e.o
  CC(target) Release/obj.target/libsundown/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_html_e.o
  CC(target) Release/obj.target/libsundown/snowcrash/ext/markdown-parser/ext/sundown/html/html.o
  CC(target) Release/obj.target/libsundown/snowcrash/ext/markdown-parser/ext/sundown/html/html_smartypants.o
  LIBTOOL-STATIC Release/sundown.a
  CXX(target) Release/obj.target/protagonist/src/annotation.o
In file included from ../src/annotation.cc:1:
../src/protagonist.h:11:36: error: expected class name
    class Blueprint : public node::ObjectWrap {
                                   ^
../src/protagonist.h:26: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/Bruce/.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/annotation.cc:1:
../src/protagonist.h:33:43: error: expected class name
    class SourceAnnotation : public node::ObjectWrap {
                                          ^
../src/protagonist.h:45: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/Bruce/.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/annotation.cc:1:
../src/protagonist.h:52:33: error: expected class name
    class Result : public node::ObjectWrap {
                                ^
../src/protagonist.h:66: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/Bruce/.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/annotation.cc:1:
../src/protagonist.h:73:46: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
    extern v8::Handle<v8::Value> Parse(const v8::Arguments& args);
                                             ^~~~~~~~~~~~~
                                             v8::internal::Arguments
/Users/Bruce/.node-gyp/0.11.13/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/annotation.cc:19:17: error: calling a protected constructor of class 'v8::HandleScope'                                                  [52/1832]
    HandleScope scope;
                ^
/Users/Bruce/.node-gyp/0.11.13/deps/v8/include/v8.h:845:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../src/annotation.cc:21: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/Bruce/.node-gyp/0.11.13/deps/v8/include/v8.h:3520:16: note: passing argument to parameter 'isolate' here
      Isolate* isolate,
               ^
../src/annotation.cc:23:29: error: no member named 'NewSymbol' in 'v8::String'
    t->SetClassName(String::NewSymbol("SourceAnnotation"));
                    ~~~~~~~~^
../src/annotation.cc:25:41: error: 'New' is a private member of 'v8::PersistentBase<v8::Function>'
    constructor = Persistent<Function>::New(t->GetFunction());
                                        ^
/Users/Bruce/.node-gyp/0.11.13/deps/v8/include/v8.h:594:23: note: declared private here
  V8_INLINE static T* New(Isolate* isolate, T* that);
                      ^
../src/annotation.cc:25:61: error: too few arguments to function call, expected 2, have 1
    constructor = Persistent<Function>::New(t->GetFunction());
                  ~~~~~~~~~~~~~~~~~~~~~~~~~                 ^
/Users/Bruce/.node-gyp/0.11.13/deps/v8/include/v8.h:594:3: note: 'New' declared here
  V8_INLINE static T* New(Isolate* isolate, T* that);
  ^
/Users/Bruce/.node-gyp/0.11.13/deps/v8/include/v8config.h:312:20: note: expanded from macro 'V8_INLINE'
# define V8_INLINE inline __attribute__((always_inline))
                   ^
../src/annotation.cc:26:26: error: no member named 'NewSymbol' in 'v8::String'
    exports->Set(String::NewSymbol("SourceAnnotation"), constructor);
                 ~~~~~~~~^
../src/annotation.cc:29:43: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> SourceAnnotation::New(const Arguments& args)
                                          ^~~~~~~~~
                                          v8::internal::Arguments
/Users/Bruce/.node-gyp/0.11.13/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/annotation.cc:31:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/Bruce/.node-gyp/0.11.13/deps/v8/include/v8.h:845:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../src/annotation.cc:33:17: error: no member named 'Wrap' in 'protagonist::SourceAnnotation'
    annotation->Wrap(args.This());
    ~~~~~~~~~~  ^
../src/annotation.cc:33:26: error: member access into incomplete type 'const v8::internal::Arguments'
    annotation->Wrap(args.This());
                         ^
Users/Bruce/.node-gyp/0.11.13/deps/v8/include/v8.h:149:7: note: forward declaration of 'v8::internal::Arguments'
class Arguments;
      ^
../src/annotation.cc:34:18: error: no member named 'Close' in 'v8::HandleScope'
    return scope.Close(args.This());
           ~~~~~ ^
../src/annotation.cc:34:28: error: member access into incomplete type 'const v8::internal::Arguments'
    return scope.Close(args.This());
                           ^
/Users/Bruce/.node-gyp/0.11.13/deps/v8/include/v8.h:149: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/protagonist/src/annotation.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/Bruce/.nvm/v0.11.13/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1046:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/Users/Bruce/.nvm/v0.11.13/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Bruce/node_modules/protagonist
gyp ERR! node -v v0.11.13
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR! protagonist@0.15.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protagonist@0.15.0 install script.
npm ERR! This is most likely a problem with the protagonist 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 protagonist
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.4.0
npm ERR! command "/Users/Bruce/.nvm/v0.11.13/bin/node" "/Users/Bruce/.nvm/v0.11.13/bin/npm" "install" "protagonist"
npm ERR! cwd /Users/Bruce
npm ERR! node -v v0.11.13
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/Bruce/npm-debug.log
npm ERR! not ok code 0

      

+3


source to share


2 answers


Finally, the problem is that it only supports node 0.10.



Switch node version to 0.10.

+3


source


In case anyone else touches on this issue later, it was a problem for me not accepting the xcode license (since I had this installed). To get it working, follow these steps:

  • run sudo xcodebuild

    in terminal
  • scroll the license through the "space"
  • type accept



Then installing the main hero via the command should work:

npm install protagonist

0


source







All Articles