①
管理员模式npm install --global windows-build-tools
②
下载opencv 解压到一个文件夹(如:D:\opencv)
https://github.com/opencv/opencv/releases/
③
设置环境变量
OPENCV_INCLUDE_DIR
OPENCV_LIB_DIR
OPENCV_BIN_DIR
path加入%OPENCV_BIN_DIR%
④
# linux and osx:
export OPENCV4NODEJS_DISABLE_AUTOBUILD=1
# on windows:
set OPENCV4NODEJS_DISABLE_AUTOBUILD=1
⑤
npm install --global opencv4nodejs