In file included from ../../nan/nan.h:82: ../../nan/nan_new.h:24:43: error: no member named 'Handle' in namespace 'v8' template <typename T> v8::Local<T> To(v8::Handle<v8::Integer> i); ~~~~^ ../../nan/nan_new.h:24:61: error: expected '(' for function-style cast or type construction template <typename T> v8::Local<T> To(v8::Handle<v8::Integer> i); ~~~~~~~~~~~^ ../../nan/nan_new.h:24:63: error: use of undeclared identifier 'i' template <typename T> v8::Local<T> To(v8::Handle<v8::Integer> i); ^ ../../nan/nan_new.h:29:21: error: no template named 'Handle' in namespace 'v8' To<v8::Integer>(v8::Handle<v8::Integer> i) { return i->ToInteger(); } ~~~~^ ../../nan/nan_new.h:34:19: error: no template named 'Handle' in namespace 'v8' To<v8::Int32>(v8::Handle<v8::Integer> i) { return i->ToInt32(); } ~~~~^ ../../nan/nan_new.h:39:20: error: no template named 'Handle' in namespace 'v8' To<v8::Uint32>(v8::Handle<v8::Integer> i) { return i->ToUint32(); } ~~~~^ ../../nan/nan_new.h:66:12: error: no template named 'Handle' in namespace 'v8' , v8::Handle<v8::ObjectTemplate> tmpl = v8::Handle<v8::ObjectTemplate>() ~~~~^ ../../nan/nan_new.h:67:12: error: no template named 'Handle' in namespace 'v8' , v8::Handle<v8::Value> obj = v8::Handle<v8::Value>()); ~~~~^ ../../nan/nan_new.h:66:50: error: no member named 'Handle' in namespace 'v8' , v8::Handle<v8::ObjectTemplate> tmpl = v8::Handle<v8::ObjectTemplate>() ~~~~^ ../../nan/nan_new.h:66:75: error: expected '(' for function-style cast or type construction , v8::Handle<v8::ObjectTemplate> tmpl = v8::Handle<v8::ObjectTemplate>() ~~~~~~~~~~~~~~~~~~^ ../../nan/nan_new.h:66:77: error: expected expression , v8::Handle<v8::ObjectTemplate> tmpl = v8::Handle<v8::ObjectTemplate>() ^ ../../nan/nan_new.h:67:40: error: no member named 'Handle' in namespace 'v8' , v8::Handle<v8::Value> obj = v8::Handle<v8::Value>()); ~~~~^ ../../nan/nan_new.h:67:56: error: expected '(' for function-style cast or type construction , v8::Handle<v8::Value> obj = v8::Handle<v8::Value>()); ~~~~~~~~~^ ../../nan/nan_new.h:67:58: error: expected expression , v8::Handle<v8::Value> obj = v8::Handle<v8::Value>()); ^ ../../nan/nan_new.h:85:12: error: no template named 'Handle' in namespace 'v8' , v8::Handle<v8::Value> data = v8::Handle<v8::Value>()); ~~~~^ ../../nan/nan_new.h:85:41: error: no member named 'Handle' in namespace 'v8' , v8::Handle<v8::Value> data = v8::Handle<v8::Value>()); ~~~~^ ../../nan/nan_new.h:85:57: error: expected '(' for function-style cast or type construction , v8::Handle<v8::Value> data = v8::Handle<v8::Value>()); ~~~~~~~~~^ ../../nan/nan_new.h:85:59: error: expected expression , v8::Handle<v8::Value> data = v8::Handle<v8::Value>()); ^ ../../nan/nan_new.h:93:12: error: no template named 'Handle' in namespace 'v8' , v8::Handle<v8::Value> data = v8::Handle<v8::Value>() ~~~~^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/imac/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:400:28) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12) gyp ERR! System Darwin 22.3.0 gyp ERR! command "/Users/imac/.nvm/versions/node/v14.21.3/bin/node" "/Users/imac/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/imac/Documents/H5CiticsfFinanceProject/citicsf-mobile-H5-public/node_modules/bufferutil gyp ERR! node -v v14.21.3 gyp ERR! node-gyp -v v5.1.1 gyp ERR! not ok
解决方式: 尝试使用`--ignore-scripts`标志**:在运行`npm install`命令时,可以尝试使用`--ignore-scripts`标志来跳过执行可能导致错误的脚本。运行以下命令进行安装:
npm install --ignore-scripts ,然后npm start 就可以了