Skip to content

Commit 34f02c3

Browse files
bump nan version to fix node v10 issues + fix windows error message if auto build disabled and OPENCV_LIB_DIR not defined
1 parent 4abd1bc commit 34f02c3

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

lib/commons.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ function resolvePath(filePath, file) {
1111
const defaultDir = '/usr/local';
1212

1313
function getLibDir() {
14-
return resolvePath(process.env.OPENCV_LIB_DIR) || `${defaultDir}/lib`;
14+
const libPath = resolvePath(process.env.OPENCV_LIB_DIR)
15+
if (process.platform === 'win32' && !libPath) {
16+
throw new Error('OPENCV_LIB_DIR is not defined')
17+
}
18+
return libPath || `${defaultDir}/lib`;
1519
}
1620

1721
module.exports = {

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"gypfile": true,
4040
"dependencies": {
4141
"macro-inferno": "^0.2.1",
42-
"nan": "^2.7.0",
42+
"nan": "^2.10.0",
4343
"native-node-utils": "0.1.2",
4444
"opencv-build": "^0.0.12"
4545
},

0 commit comments

Comments
 (0)