0

我正在尝试在 kiosk 模式下使用树莓派上的 nodejs 串行端口模块运行电子应用程序。不幸的是,我的电子应用程序没有开始出现错误:(Could not locate the bindings file下面的完整错误)。

我假设这与电子重建在尝试重新编译模块的二进制文件时找不到串行端口模块的绑定文件有关。当我尝试运行时,electron-rebuild -f -w .我得到了同样的could not locate the bindings file错误。有谁知道我怎样才能开始我的程序?

App threw an error during load
Error: Could not locate the bindings file. Tried:
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/build/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/build/Debug/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/build/Release/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/out/Debug/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/Debug/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/out/Release/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/Release/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/build/default/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/compiled/16.9.1/linux/arm/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/addon-build/release/install-root/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/addon-build/debug/install-root/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/addon-build/default/install-root/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/lib/binding/node-v99-linux-arm/bindings.node
    at bindings (/home/pi/Documents/test/test2/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/home/pi/Documents/test/test2/node_modules/@serialport/bindings/lib/linux.js:2:36)
    at Module._compile (node:internal/modules/cjs/loader:1116:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:829:12)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object.<anonymous> (/home/pi/Documents/test/test2/node_modules/@serialport/bindings/lib/index.js:14:22)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Could not locate the bindings file. Tried:
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/build/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/build/Debug/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/build/Release/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/out/Debug/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/Debug/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/out/Release/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/Release/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/build/default/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/compiled/16.9.1/linux/arm/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/addon-build/release/install-root/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/addon-build/debug/install-root/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/addon-build/default/install-root/bindings.node
 → /home/pi/Documents/test/test2/node_modules/@serialport/bindings/lib/binding/node-v99-linux-arm/bindings.node
    at bindings (/home/pi/Documents/test/test2/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/home/pi/Documents/test/test2/node_modules/@serialport/bindings/lib/linux.js:2:36)
    at Module._compile (node:internal/modules/cjs/loader:1116:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:829:12)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object.<anonymous> (/home/pi/Documents/test/test2/node_modules/@serialport/bindings/lib/index.js:14:22)


4

0 回答 0