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

too many errors when npm install #61

Open
gipcompany opened this issue Dec 23, 2016 · 1 comment
Open

too many errors when npm install #61

gipcompany opened this issue Dec 23, 2016 · 1 comment

Comments

@gipcompany
Copy link

I just run npm install according to README.md, but found too many errors as follows. How do I fix them?

$ npm install

> [email protected] install /Users/ishida/git/vendor/bleeding-edge-sample-app/node_modules/watchify/node_modules/fsevents
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
../../nan/nan.h:339:13: error: no member named 'New' in 'v8::String'
    return  _NAN_ERROR(v8::Exception::Error, errmsg);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../../nan/nan.h:343:5: error: no member named 'ThrowException' in namespace 'v8'
    _NAN_THROW_ERROR(v8::Exception::Error, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
      ~~~~^
../../nan/nan.h:343:5: error: no member named 'New' in 'v8::String'
    _NAN_THROW_ERROR(v8::Exception::Error, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
                         ^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../../nan/nan.h:348:9: error: no type named 'ThrowException' in namespace 'v8'
    v8::ThrowException(error);
    ~~~~^
../../nan/nan.h:355:65: error: no member named 'New' in 'v8::String'
    v8::Local<v8::Value> err = v8::Exception::Error(v8::String::New(msg));
                                                    ~~~~~~~~~~~~^
../../nan/nan.h:356:50: error: expected '(' for function-style cast or type construction
    v8::Local<v8::Object> obj = err.As<v8::Object>();
                                       ~~~~~~~~~~^
../../nan/nan.h:356:52: error: expected expression
    v8::Local<v8::Object> obj = err.As<v8::Object>();
                                                   ^
../../nan/nan.h:357:65: error: too few arguments to function call, expected 2, have 1
    obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
                                      ~~~~~~~~~~~~~~            ^
/Users/ishida/.node-gyp/6.9.2/include/node/v8.h:2558:3: note: 'New' declared here
  static Local<Integer> New(Isolate* isolate, int32_t value);
  ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:357:26: error: no member named 'New' in 'v8::String'
    obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
             ~~~~~~~~~~~~^
../../nan/nan.h:369:12: error: no member named 'New' in 'v8::String'
    return _NAN_ERROR(v8::Exception::TypeError, errmsg);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../../nan/nan.h:373:5: error: no member named 'ThrowException' in namespace 'v8'
    _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
      ~~~~^
../../nan/nan.h:373:5: error: no member named 'New' in 'v8::String'
    _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
                         ^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../../nan/nan.h:377:12: error: no member named 'New' in 'v8::String'
    return _NAN_ERROR(v8::Exception::RangeError, errmsg);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../../nan/nan.h:381:5: error: no member named 'ThrowException' in namespace 'v8'
    _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
      ~~~~^
../../nan/nan.h:381:5: error: no member named 'New' in 'v8::String'
    _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
      v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \
                         ^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                     ~~~~~~~~~~~~^
../../nan/nan.h:406:13: error: no member named 'smalloc' in namespace 'node'
    , node::smalloc::FreeCallback callback
      ~~~~~~^
../../nan/nan.h:141:71: note: expanded from macro 'NAN_INLINE'
# define NAN_INLINE(declarator) inline __attribute__((always_inline)) declarator
                                                                      ^~~~~~~~~~
../../nan/nan.h:416:12: error: no matching function for call to 'New'
    return node::Buffer::New(data, size);
           ^~~~~~~~~~~~~~~~~
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'char *' to 'v8::Isolate *' for 1st argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
                                       ^
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:34:40: note: candidate function not viable: no known conversion from 'char *' to 'v8::Isolate *' for 1st argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:46:40: note: candidate function not viable: requires 3 arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:39:40: note: candidate function not viable: requires 5 arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:420:12: error: no matching function for call to 'New'
    return node::Buffer::New(size);
           ^~~~~~~~~~~~~~~~~
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:31:40: note: candidate function not viable: requires 2 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
                                       ^
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:34:40: note: candidate function not viable: requires at least 2 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:46:40: note: candidate function not viable: requires 3 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/ishida/.node-gyp/6.9.2/include/node/node_buffer.h:39:40: note: candidate function not viable: requires 5 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:427:26: error: no member named 'Use' in namespace 'node::Buffer'
    return node::Buffer::Use(data, size);
           ~~~~~~~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/ishida/.nvm/versions/node/v6.9.2/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 16.1.0
gyp ERR! command "/Users/ishida/.nvm/versions/node/v6.9.2/bin/node" "/Users/ishida/.nvm/versions/node/v6.9.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ishida/git/vendor/bleeding-edge-sample-app/node_modules/watchify/node_modules/fsevents
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN [email protected] license should be a valid SPDX license expression
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchify/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
@ganioc
Copy link

ganioc commented Jun 2, 2021

It's 2021 now.

I am trying the sample code when studying the Component Testing chapter. And met a lot of problems using Karma Jasmine and babelify.

Most of the problems are about React version, the latest version is 17, and the tutorial is based on 14.

Some differences listed here.

  1. TestUtils missing
    import ReactTestUtils from 'react-dom/test-utils', Dont use obsolete react-addons-test-utils either.

  2. ES module support
    Use babelify to transform ES module for Browserify.

  3. getDOMNode is not a function
    New version, you use ReactDOM.findDOMNode( componentInstance )

So for freshhands, don't use these source code for React studying.

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

2 participants