puer
puer copied to clipboard
node v7.10.0 安装 [email protected] 报错
报错信息如下:
../nodefsevents.cc:31:30: error: expected class name
class NodeFSEvents : node::ObjectWrap {
^
../nodefsevents.cc:66:51: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> Shutdown(const v8::Arguments& args) {
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/shukushinu/.node-gyp/7.10.0/include/node/v8.h:150:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../nodefsevents.cc:72:46: 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/shukushinu/.node-gyp/7.10.0/include/node/v8.h:150:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../nodefsevents.cc:34:21: error: calling a protected constructor of class 'v8::HandleScope'
HandleScope scope;
^
/Users/shukushinu/.node-gyp/7.10.0/include/node/v8.h:908:13: note: declared protected here
V8_INLINE HandleScope() {}
^
../nodefsevents.cc:35:20: error: use of undeclared identifier 'NODE_PSYMBOL'
emit_sym = NODE_PSYMBOL("emit");
^
../nodefsevents.cc:36:22: error: use of undeclared identifier 'NODE_PSYMBOL'
change_sym = NODE_PSYMBOL("fsevent");
^
../nodefsevents.cc:37:59: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'v8::Handle<v8::Value> (const v8::internal::Arguments &)' (aka 'v8::Local<v8::Value> (const v8::internal::Arguments &)')
Local<FunctionTemplate> t = FunctionTemplate::New(NodeFSEvents::New);
^~~~~~~~~~~~~~~~~
/Users/shukushinu/.node-gyp/7.10.0/include/node/v8.h:5079:16: note: passing argument to parameter 'isolate' here
Isolate* isolate, FunctionCallback callback = 0,
^
../nodefsevents.cc:38:62: error: 'New' is a private member of 'v8::PersistentBase<v8::FunctionTemplate>'
constructor_template = Persistent<FunctionTemplate>::New(t);
^
/Users/shukushinu/.node-gyp/7.10.0/include/node/v8.h:655:23: note: declared private here
V8_INLINE static T* New(Isolate* isolate, T* that);
^
../nodefsevents.cc:38:67: error: too few arguments to function call, expected 2, have 1
constructor_template = Persistent<FunctionTemplate>::New(t);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/shukushinu/.node-gyp/7.10.0/include/node/v8.h:655:3: note: 'New' declared here
V8_INLINE static T* New(Isolate* isolate, T* that);
^
/Users/shukushinu/.node-gyp/7.10.0/include/node/v8config.h:293:20: note: expanded from macro 'V8_INLINE'
# define V8_INLINE inline __attribute__((always_inline))
^
../nodefsevents.cc:39:29: error: member reference type 'v8::Persistent<v8::FunctionTemplate>' is not a pointer; did you mean to use '.'?
constructor_template->InstanceTemplate()->SetInternalFieldCount(1);
~~~~~~~~~~~~~~~~~~~~^~
.
../nodefsevents.cc:39:31: error: no member named 'InstanceTemplate' in 'v8::Persistent<v8::FunctionTemplate, v8::NonCopyablePersistentTraits<v8::FunctionTemplate> >'
constructor_template->InstanceTemplate()->SetInternalFieldCount(1);
~~~~~~~~~~~~~~~~~~~~ ^
../nodefsevents.cc:40:29: error: member reference type 'v8::Persistent<v8::FunctionTemplate>' is not a pointer; did you mean to use '.'?
constructor_template->SetClassName(String::NewSymbol("FSEvents"));
~~~~~~~~~~~~~~~~~~~~^~
.
../nodefsevents.cc:40:31: error: no member named 'SetClassName' in 'v8::Persistent<v8::FunctionTemplate, v8::NonCopyablePersistentTraits<v8::FunctionTemplate> >'
constructor_template->SetClassName(String::NewSymbol("FSEvents"));
~~~~~~~~~~~~~~~~~~~~ ^
../nodefsevents.cc:40:52: error: no member named 'NewSymbol' in 'v8::String'
constructor_template->SetClassName(String::NewSymbol("FSEvents"));
~~~~~~~~^
../nodefsevents.cc:41:59: error: member reference type 'v8::Persistent<v8::FunctionTemplate>' is not a pointer; did you mean to use '.'?
Local<Function> constructor = constructor_template->GetFunction();
~~~~~~~~~~~~~~~~~~~~^~
.
../nodefsevents.cc:41:61: error: no member named 'GetFunction' in 'v8::Persistent<v8::FunctionTemplate, v8::NonCopyablePersistentTraits<v8::FunctionTemplate> >'
Local<Function> constructor = constructor_template->GetFunction();
~~~~~~~~~~~~~~~~~~~~ ^
../nodefsevents.cc:43:93: error: too few arguments to function call, expected 2, have 1
constructor->Set(String::New("kFSEventStreamEventFlagNone"), Integer::New(0x00000000));
~~~~~~~~~~~~ ^
/Users/shukushinu/.node-gyp/7.10.0/include/node/v8.h:2770:3: note: 'New' declared here
static Local<Integer> New(Isolate* isolate, int32_t value);
^
../nodefsevents.cc:43:34: error: no member named 'New' in 'v8::String'
constructor->Set(String::New("kFSEventStreamEventFlagNone"), Integer::New(0x00000000));
~~~~~~~~^
../nodefsevents.cc:44:104: error: too few arguments to function call, expected 2, have 1
constructor->Set(String::New("kFSEventStreamEventFlagMustScanSubDirs"), Integer::New(0x00000001));
~~~~~~~~~~~~ ^
/Users/shukushinu/.node-gyp/7.10.0/include/node/v8.h:2770:3: note: 'New' declared here
static Local<Integer> New(Isolate* isolate, int32_t value);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fswatch/nodefsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/shukushinu/.nvm/versions/node/v7.10.0/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:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.3.0
gyp ERR! command "/Users/shukushinu/.nvm/versions/node/v7.10.0/bin/node" "/Users/shukushinu/.nvm/versions/node/v7.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/shukushinu/.nvm/versions/node/v7.10.0/lib/node_modules/fsevents
gyp ERR! node -v v7.10.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm ERR! Darwin 16.3.0
npm ERR! argv "/Users/shukushinu/.nvm/versions/node/v7.10.0/bin/node" "/Users/shukushinu/.nvm/versions/node/v7.10.0/bin/npm" "install" "[email protected]" "[email protected]"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
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! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the fsevents package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!
可以试下最新版是否可以了
node 8.9.0 没问题 我的7.10.0 也是这样