首页 > 解决方案 > 带有串口本机模块的电子

问题描述

您好我正在尝试在电子中使用串行端口模块,但是当运行它时,它试图在任何地方找到模块,它唯一不看的地方是在 node_modules 文件夹中,已经运行 electron-rebuild 和 electron-builder install-app-deps 但是没有什么 。

Uncaught Error: Could not locate the bindings file. Tried:
 → /home/myusername/my-projects/yuumi-cnc/build/bindings.node
 → /home/myusername/my-projects/yuumi-cnc/build/Debug/bindings.node
 → /home/myusername/my-projects/yuumi-cnc/build/Release/bindings.node
 → /home/myusername/my-projects/yuumi-cnc/out/Debug/bindings.node
 → /home/myusername/my-projects/yuumi-cnc/Debug/bindings.node
 → /home/myusername/my-projects/yuumi-cnc/out/Release/bindings.node
 → /home/myusername/my-projects/yuumi-cnc/Release/bindings.node
 → /home/myusername/my-projects/yuumi-cnc/build/default/bindings.node
 → /home/myusername/my-projects/yuumi-cnc/compiled/12.4.0/linux/x64/bindings.node
 → /home/myusername/my-projects/yuumi-cnc/addon-build/release/install-root/bindings.node
 → /home/myusername/my-projects/yuumi-cnc/addon-build/debug/install-root/bindings.node
 → /home/myusername/my-projects/yuumi-cnc/addon-build/default/install-root/bindings.node
 → /home/myusername/my-projects/yuumi-cnc/lib/binding/node-v73-linux-x64/bindings.node
    at bindings (bindings.js:126)
    at Object../node_modules/@serialport/bindings/lib/linux.js (linux.js:1)
    at __webpack_require__ (bootstrap:726)
    at fn (bootstrap:100)
    at Object../node_modules/@serialport/bindings/lib/index.js (index.js:14)
    at __webpack_require__ (bootstrap:726)
    at fn (bootstrap:100)
    at Object../node_modules/serialport/lib/index.js (index.js:2)
    at __webpack_require__ (bootstrap:726)
    at fn (bootstrap:100)

I have no idea how to solve this

标签: javascriptelectron

解决方案


推荐阅读