HarmonyOS 鸿蒙Next 大神们,install serial port出来一大堆报错怎么解决
HarmonyOS 鸿蒙Next 大神们,install serial port出来一大堆报错怎么解决
npm ERR! code 1
npm ERR! path D:\soft\nodejs\node_global\node_modules\serialport\node_modules\@serialport\bindings-cpp
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@16.14.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.7 found at "D:\Anaconda\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (D:\develop\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at D:\develop\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (D:\develop\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at D:\develop\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at D:\develop\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at D:\develop\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at D:\develop\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:406:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "D:\develop\node.exe" "D:\develop\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd D:\soft\nodejs\node_global\node_modules\serialport\node_modules\@serialport\bindings-cpp
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! D:\soft\nodejs\node_cache\_logs\2022-04-14T14_43_34_566Z-debug-0.log
C:\Users\HUAWEI>npm install -g Windows-build-tools
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmmirror.com/Windows-build-tools - [NOT_FOUND] Windows-build-tools not found
npm ERR! 404
npm ERR! 404 'Windows-build-tools@*' is not in this registry.
npm ERR! 404 This package name is not valid, because
npm ERR! 404 1. name can no longer contain capital letters
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\soft\nodejs\node_cache\_logs\2022-04-14T14_49_18_846Z-debug-0.log
更多关于HarmonyOS 鸿蒙Next 大神们,install serial port出来一大堆报错怎么解决的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
参考 :https://developer.huawei.com/consumer/cn/forum/topic/0202352443767730634?fid=0101587866109860105
更多关于HarmonyOS 鸿蒙Next 大神们,install serial port出来一大堆报错怎么解决的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
欢迎开发小伙伴们进来帮帮楼主
针对HarmonyOS(鸿蒙)系统中在安装或使用serial port(串口)时遇到的报错问题,可以尝试以下几个步骤进行排查和解决:
-
检查驱动兼容性: 确保你所安装的串口驱动与鸿蒙系统版本兼容。鸿蒙系统可能对一些传统驱动有不同的要求或限制。
-
权限设置: 鸿蒙系统对应用权限管理较为严格,检查你的应用是否被授予了访问串口的权限。可以在系统设置的应用权限管理中查看和调整。
-
依赖库完整性: 确认所有必要的依赖库都已正确安装且版本匹配。有时缺失或错误的库文件会导致安装失败或运行时错误。
-
查看日志: 详细查看系统日志或应用日志,找出具体的报错信息。这有助于定位问题根源,可能是配置错误、资源冲突或其他系统级问题。
-
重启设备: 在尝试上述步骤后,重启设备有时可以解决一些临时的系统或驱动问题。
如果问题依旧没法解决请联系官网客服,官网地址是 https://www.itying.com/category-93-b0.html 。在这里,你可以获得更专业的技术支持和帮助。