我尝试使用Termux在Android的nodejs上运行应用程序。当我启动npm时,它说找不到绑定文件。我的设备已植根。
nodejs v10.15.3
npm 6.4.1
/data/data/com.termux/files/home/IoT-blockchain-Std/node_modules/bindings/bindings.js:91
throw err
^
Error: Could not locate the bindings file. Tried:
→/data/data/com.termux/files/home/IoT-blockchain-Std/node_modules/ref/build/binding.node
→/data/data/com.termux/files/home/IoT-blockchain-Std/node_modules/ref/build/Debug/binding.node
→/data/data/com.termux/files/home/IoT-blockchain-Std/node_modules/ref/build/Release/binding.node
→/data/data/com.termux/files/home/IoT-blockchain-Std/node_modules/ref/out/Debug/binding.node
→/data/data/com.termux/files/home/IoT-blockchain-Std/node_modules/ref/Debug/binding.node
→/data/data/com.termux/files/home/IoT-blockchain-Std/node_modules/ref/out/Release/binding.node
→/data/data/com.termux/files/home/IoT-blockchain-Std/node_modules/ref/Release/binding.node
→/data/data/com.termux/files/home/IoT-blockchain-Std/node_modules/ref/build/default/binding.node
→/data/data/com.termux/files/home/IoT-blockchain-Std/node_modules/ref/compiled/10.15.3/android/arm64/binding.node
at bindings (/data/data/com.termux/files/home/IoT-blockchain-Std/node_modules/bindings/bindings.js:88:9)
at Object.<anonymous> (/data/data/com.termux/files/home/IoT-blockchain-Std/node_modules/ref/lib/ref.js:5:47)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/data/data/com.termux/files/home/IoT-blockchain-Std/node_modules/ffi/lib/ffi.js:6:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! IoT-blockchain-Std@1.0.0 start: `node build/main.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the IoT-blockchain-Std@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
我该如何解决这个问题?
答案 0 :(得分:0)
我已经解决了安装丢失文件的相同问题。
您的情况是biding.node
,所以您应该这样做:npm install binding