C:\Users\Administrator>npm install opencv4nodejs npm ERR! code 1 npm ERR! path C:\Users\Administrator\node_modules\opencv4nodejs npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node ./install/install.js npm ERR! info install using lib dir: C:/Users/Administrator/node_modules/opencv-build/opencv/build/lib/Release npm ERR! C:\Users\Administrator\node_modules\opencv4nodejs\install\install.js:37 npm ERR! throw new Error('library dir does not exist: ' + libDir) npm ERR! ^ npm ERR! npm ERR! Error: library dir does not exist: C:/Users/Administrator/node_modules/opencv-build/opencv/build/lib/Release npm ERR! at Object.<anonymous> (C:\Users\Administrator\node_modules\opencv4nodejs\install\install.js:37:9) npm ERR! at Module._compile (node:internal/modules/cjs/loader:1254:14) npm ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) npm ERR! at Module.load (node:internal/modules/cjs/loader:1117:32) npm ERR! at Module._load (node:internal/modules/cjs/loader:958:12) npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) npm ERR! at node:internal/main/run_main_module:23:47 npm ERR! npm ERR! Node.js v18.16.0 npm ERR! A complete log of this run can be found in: npm ERR! H:\nodejs\node_cache\_logs\2023-05-15T14_07_16_979Z-debug-0.log
时间: 2023-06-19 22:09:49 浏览: 214
npm install 错误问题 gyp ERR! configure error gyp ERR! stack Error: Command failed: C:\Users\Zhan
看起来你在安装 opencv4nodejs 这个 Node.js 模块时出现了错误。根据错误日志,似乎是缺少了 opencv-build 这个模块导致的。你可以尝试先安装 opencv-build,再安装 opencv4nodejs,命令如下:
```
npm install opencv-build
npm install opencv4nodejs
```
如果还是有问题,可以参考 opencv4nodejs 的官方文档,里面有详细的安装步骤和常见问题解决方法。
阅读全文