I got following error while installing bufferutil.
> bufferutil@1.2.1 install /usr/local/lib/node_modules/bufferutil
> node-gyp rebuild
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
In file included from ../src/bufferutil.cc:7:
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:345:16: warning: alias
declarations are a C++11 extension [-Wc++11-extensions]
using Handle = Local<T>;
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:481:29: warning: alias
declarations are a C++11 extension [-Wc++11-extensions]
using PhantomCallbackData = WeakCallbackInfo<T>;
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:484:6: warning: scoped
enumerations are a C++11 extension [-Wc++11-extensions]
enum class WeakCallbackType { kParameter, kInternalFields };
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:667:49: warning: deleted
function definitions are a C++11 extension [-Wc++11-extensions]
PersistentBase(const PersistentBase& other) = delete; // NOLINT
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:668:43: warning: deleted
function definitions are a C++11 extension [-Wc++11-extensions]
void operator=(const PersistentBase&) = delete;
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:844:26: warning: rvalue
references are a C++11 extension [-Wc++11-extensions]
V8_INLINE Global(Global&& other) : PersistentBase<T>(other.val_) { // NOLINT
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:852:40: warning: rvalue
references are a C++11 extension [-Wc++11-extensions]
V8_INLINE Global& operator=(Global<S>&& rhs) { // NOLINT
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:874:27: warning: deleted
function definitions are a C++11 extension [-Wc++11-extensions]
Global(const Global&) = delete;
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:875:35: warning: deleted
function definitions are a C++11 extension [-Wc++11-extensions]
void operator=(const Global&) = delete;
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:864:44: warning: rvalue
references are a C++11 extension [-Wc++11-extensions]
Global Pass() { return static_cast<Global&&>(*this); } // NOLINT
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:882:26: warning: alias
declarations are a C++11 extension [-Wc++11-extensions]
using UniquePersistent = Global<T>;
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:2104:6: warning: scoped
enumerations are a C++11 extension [-Wc++11-extensions]
enum class NewStringType { kNormal, kInternalized };
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:2314:42: warning: use of
enumeration in a nested name specifier is a C++11 extension
[-Wc++11-extensions]
kNormalString = static_cast<int>(v8::NewStringType::kNormal),
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:2315:48: warning: use of
enumeration in a nested name specifier is a C++11 extension
[-Wc++11-extensions]
kInternalizedString = static_cast<int>(v8::NewStringType::kInternalized)
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:2645:6: warning: scoped
enumerations are a C++11 extension [-Wc++11-extensions]
enum class IntegrityLevel { kFrozen, kSealed };
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:3244:6: warning: scoped
enumerations are a C++11 extension [-Wc++11-extensions]
enum class ConstructorBehavior { kThrow, kAllow };
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:3455:6: warning: scoped
enumerations are a C++11 extension [-Wc++11-extensions]
enum class ArrayBufferCreationMode { kInternalized, kExternalized };
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:3539:38: warning: use of
enumeration in a nested name specifier is a C++11 extension
[-Wc++11-extensions]
ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized);
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:3902:38: warning: use of
enumeration in a nested name specifier is a C++11 extension
[-Wc++11-extensions]
ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized);
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:4583:6: warning: scoped
enumerations are a C++11 extension [-Wc++11-extensions]
enum class PropertyHandlerFlags {
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:4605:36: warning: use of
enumeration in a nested name specifier is a C++11 extension
[-Wc++11-extensions]
PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:4633:36: warning: use of
enumeration in a nested name specifier is a C++11 extension
[-Wc++11-extensions]
PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:5104:6: warning: scoped
enumerations are a C++11 extension [-Wc++11-extensions]
enum class MicrotasksPolicy { kExplicit, kScoped, kAuto };
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:5395:6: warning: scoped
enumerations are a C++11 extension [-Wc++11-extensions]
enum class MemoryPressureLevel { kNone, kModerate, kCritical };
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:5431:35: warning: defaulted
function definitions are a C++11 extension [-Wc++11-extensions]
virtual ~EmbedderHeapTracer() = default;
^
/Users/sunweirong/.node-gyp/6.5.0/include/node/v8.h:8006:46: warning: use of
enumeration in a nested name specifier is a C++11 extension
[-Wc++11-extensions]
Set(v8::String::NewFromUtf8(isolate, name, NewStringType::kNormal)
^
In file included from ../src/bufferutil.cc:11:
/Users/sunweirong/.node-gyp/6.5.0/include/node/node_object_wrap.h:64:50: warning:
use of enumeration in a nested name specifier is a C++11 extension
[-Wc++11-extensions]
persistent().SetWeak(this, WeakCallback, v8::WeakCallbackType::kParameter);
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:43:3: error: This version of node/NAN/v8 requires a
C++11 compiler
# error This version of node/NAN/v8 requires a C++11 compiler
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:190:
../node_modules/nan/nan_maybe_43_inl.h:13:20: warning: alias declarations are a
C++11 extension [-Wc++11-extensions]
using MaybeLocal = v8::MaybeLocal<T>;
^
../node_modules/nan/nan_maybe_43_inl.h:16:15: warning: alias declarations are a
C++11 extension [-Wc++11-extensions]
using Maybe = v8::Maybe<T>;
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:196:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:270:45: warning: use of
enumeration in a nested name specifier is a C++11 extension
[-Wc++11-extensions]
v8::Isolate::GetCurrent(), value, v8::NewStringType::kNormal, length);
^
../node_modules/nan/nan_implementation_12_inl.h:277:25: warning: use of
enumeration in a nested name specifier is a C++11 extension
[-Wc++11-extensions]
value.data(), v8::NewStringType::kNormal, static_cast<int>(value.size()));
^
../node_modules/nan/nan_implementation_12_inl.h:283:13: warning: use of
enumeration in a nested name specifier is a C++11 extension
[-Wc++11-extensions]
v8::NewStringType::kNormal, length);
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:738:15: warning: use of enumeration in a nested name
specifier is a C++11 extension [-Wc++11-extensions]
v8::NewStringType::kNormal, length);
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:2186:
../node_modules/nan/nan_weak.h:263:15: warning: use of enumeration in a nested
name specifier is a C++11 extension [-Wc++11-extensions]
if (type == WeakCallbackType::kParameter) {
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:2190:
../node_modules/nan/nan_object_wrap.h:66:33: warning: use of enumeration in a
nested name specifier is a C++11 extension [-Wc++11-extensions]
this, WeakCallback, v8::WeakCallbackType::kParameter);
^
35 warnings and 1 error 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 (/usr/local/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.0.0
gyp ERR! command "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/bufferutil
gyp ERR! node -v v6.5.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/bin/npm" "install" "bufferutil" "-g"
npm ERR! node v6.5.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! bufferutil@1.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bufferutil@1.2.1 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 bufferutil 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 information on how to open an issue for this project with:
npm ERR! npm bugs bufferutil
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bufferutil
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/sunweirong/github/f8app/npm-debug.log
I got following error while installing bufferutil.