有没有道友指点一下开发环境 opencv4nodejs 的安装问题
本帖最后由 plaodj 于 2020-4-27 23:49 编辑有没有道友指点一下 opencv4nodejs 的安装问题
安装 nodejsappium 。。。
其它问题解决了就是这个 opencv4nodejs 安装 两天了搞不定。。。
找到的就是
npm install --global windows-build-tools
npm install --save opencv4nodejs
我看人家轻描淡写的样子好像很简单 但我这两天了都搞不定
出现错误
info install CMake suite maintained and supported by Kitware (kitware.com/cmake).
info install
info find-msbuild failed to find vs2017 via powershell: ʹ�á�0�����������á�Query��ʱ�����쳣:�������ַ����ĸ�ʽ����ȷ� ���
info find-msbuild ����λ�� ��:1 �ַ�: 78
info find-msbuild + ... ncv-build\Find-VS2017.cs'; ::Query()}
info find-msbuild + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
info find-msbuild + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
info find-msbuild + FullyQualifiedErrorId : FormatException
info find-msbuild
info find-msbuild
info find-msbuild attempting to find msbuild via registry query...
info find-msbuild trying the following msbuild paths:
info find-msbuild version: 4, path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
info find-msbuild version: 3.5, path: C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe
info install using msbuild: {
info install version: 4,
info install path: 'C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\msbuild.exe'
info install }
ERR! Error: no cmake vs compiler found for msversion: 4
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\administrator\package.json'
npm WARN administrator No description
npm WARN administrator No repository field.
npm WARN administrator No README data
npm WARN administrator No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opencv-build@0.1.9 install: `node ./install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv-build@0.1.9 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\nodejs\node_cache\_logs\2020-04-27T15_38_37_030Z-debug.log
然后又看到说
set OPENCV4NODEJS_DISABLE_AUTOBUILD=1
结果还是错
> opencv-build@0.1.9 install C:\Users\administrator\node_modules\opencv-build
> node ./install.js
info install OPENCV4NODEJS_DISABLE_AUTOBUILD is set
info install skipping auto build...
> opencv4nodejs@5.5.0 install C:\Users\administrator\node_modules\opencv4nodejs
> node ./install/install.js
info install using lib dir: D:/opencv/build/x64/vc15/lib/;
C:\Users\administrator\node_modules\opencv4nodejs\install\install.js:37
throw new Error('library dir does not exist: ' + libDir)
^
Error: library dir does not exist: D:/opencv/build/x64/vc15/lib/;
at Object.<anonymous> (C:\Users\administrator\node_modules\opencv4nodejs\install\install.js:37:9)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Function.executeUserEntryPoint (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\administrator\package.json'
npm WARN administrator No description
npm WARN administrator No repository field.
npm WARN administrator No README data
npm WARN administrator No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opencv4nodejs@5.5.0 install: `node ./install/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv4nodejs@5.5.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\nodejs\node_cache\_logs\2020-04-27T15_40_39_266Z-debug.log
我的vs版本是2019 也只有2019;出问题的缘由 可能是各个依赖的版本问题 但不确定 ;也不确定opencv是否配置正确;另外 关于 no such file or directory, open 'C:\Users\administrator\package.json'我知道解决办法就是进入nodejs的那安装目录里面
总之不换版本怎么解决吧
页:
[1]