How to pass C++11 flag down to “npm install”?
问题 I am trying to install the "opencv4nodejs" package on a MAC by running this command: CXXFLAGS=-std=gnu++11 npm i -g opencv4nodejs That gives me the following error: /usr/local/lib/node_modules/opencv4nodejs/node_modules/opencv-build/opencv/opencv/modules/highgui/src/window_cocoa.mm:269:25: error: non-constant-expression cannot be narrowed from type 'int' to 'CGFloat' (aka 'double') in initializer list [-Wc++11-narrowing] NSSize size = { width, height }; ^~~~~ /usr/local/lib/node_modules