Closed TheVinhLuong102 closed 4 years ago
Did you install the dependencies as explained here under "Running hardware tests"?: https://github.com/ibmtjbot/tjbot/blob/master/bootstrap/README.md
@chunyianliew yes I ran the bootstrap script, as mentioned above. Does that bootstrapping still miss out something important?
You also need to install the dependencies as explained almost at the bottom of the page under the title "Running hardware tests":
npm install ~/Desktop/tjbot/bootstrap/tests
@chunyianliew ok thank you for letting me know. It's not very clearly documented in the top-level documentation, so I didn't know those had to be installed first. The tests do run now, albeit not all successfully. Let me close this issue now.
@chunyianliew the tests keep failing, so I'm reopening this ticket.
My environment info is as follows:
The output of my various commands are as follows:
npm install ~/Desktop/tjbot/bootstrap/tests
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
+ tests@1.0.0
updated 1 package in 13.838s
sudo ./runTests.sh
Installing support libraries for TJBot. This may take few minutes.
Running camera test
internal/modules/cjs/loader.js:550
throw err;
^
Error: Cannot find module './build/Release/node_sleep.node'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/home/pi/Desktop/tjbot/bootstrap/tests/node_modules/sleep/index.js:1:75)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/home/pi/Desktop/tjbot/bootstrap/tests/node_modules/tjbot/lib/tjbot.js:24:15)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
Running LED test
internal/modules/cjs/loader.js:550
throw err;
^
Error: Cannot find module './build/Release/node_sleep.node'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/home/pi/Desktop/tjbot/bootstrap/tests/node_modules/sleep/index.js:1:75)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/home/pi/Desktop/tjbot/bootstrap/tests/node_modules/tjbot/lib/tjbot.js:24:15)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
Running servo test
internal/modules/cjs/loader.js:550
throw err;
^
Error: Cannot find module './build/Release/node_sleep.node'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/home/pi/Desktop/tjbot/bootstrap/tests/node_modules/sleep/index.js:1:75)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/home/pi/Desktop/tjbot/bootstrap/tests/node_modules/tjbot/lib/tjbot.js:24:15)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
Running speaker test
internal/modules/cjs/loader.js:550
throw err;
^
Error: Cannot find module './build/Release/node_sleep.node'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/home/pi/Desktop/tjbot/bootstrap/tests/node_modules/sleep/index.js:1:75)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/home/pi/Desktop/tjbot/bootstrap/tests/node_modules/tjbot/lib/tjbot.js:24:15)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
-------------------------------------------------------------------
Tests complete. Have fun! ;)
-------------------------------------------------------------------
Could you let me know what could be behind these errors?
Should I upgrade Node to v12.19.0 and Npm to 6.14.8?
Thank you very much @chunyianliew.
Closing this issue as the TJBot 2.0.0 release should resolve all outstanding issues with the hardware tests (which requires Node v15.x).
Hi TJBot repo owners,
I have installed the TJBot software on a Raspberry Pi 3 by running
curl -sL http://ibm.biz/tjbot-bootstrap | sudo sh -
. When I run the tests in~/Desktop/tjbot/bootstrap
, though, I encounter the following errors:Does this mean the test suite is broken? Or did I miss out something critical?
Thank you very much!