Closed mframos3 closed 4 years ago
Thanks for pointing out this issue. I'm not exactly sure what's going wrong here.. it looks like its failing when building the native libraries used by pigpio. I'm assuming you've done sudo apt-get install pigpio
?
The update of the Watson SDKs from watson-developer-cloud
to ibm-watson
is new, but I don't think that's the reason you're getting this error.
I'll try to replicate this on my own TJBot when I get some more time. Stay tuned.
Alright.. tried this on my own Pi starting from a clean code checkout, using Node v9.11.2 and it works. I did get the same warnings during the node-gyp
build of pigpio
, but those aren't showstoppers. But I didn't get this:
Error: /home/pi/Desktop/tjbot/recipes/conversation/node_modules/sleep/build/Release/node_sleep.node: file too short
I suspect there might have been a build problem for the sleep
module, and my recommendation would be to delete the node_modules
directory and do another npm install
. E.g.
rm -rf node_modules
npm install
Also, the use of sudo
on the recipes is because root access is needed to control the LED. Both the Conversation and STT recipes use the LED, so both should be run with sudo
.
Let me know how it goes.
Hi @jweisz and @mframos3, I am experiencing the exact same thing. Were either of you able to resolve this issue? I started this summer project with my nephew and would love to complete it. :-)
If you weren't able to resolve it, may I ask which version of Raspbian you are running? I am currently running Buster. Are there other libraries I should install?
I installed pigpio with apt-get. I used node v9.11.2 with npm 5.6.0 installed via nvm. Deleted the ~/.node-gyp folder as recommended by others having add-on build issues. Removed tjbot/bootstrap/tests/node_modules directory. npm install. sudo node test.led.js.
During the installation step and the execution step, I received the exact same output as @mframos3 pasted above.
Thank you very much for your assistance!
Solution seemed to be this...
First I switched to Node 10.16.0 because I was receiving errors regarding building modules with different node versions and 10.16.0 was the recommended version.
For the pigpio issue
sudo apt-get install pigpio
For the rpi-ws281x-native issue: I installed rpi-ws281x-native from source.
cd rpi-ws281x-native
npm install
node-gyp rebuild
I then copy pasted the resulting files into an rpi-ws281x-native directory I created in the node_modules directory.
After taking these steps, the tests/test.led.js script worked and the speech_to_text/stt.js script worked. Hope this helps anybody who might run into the same issues.
Hi, I am having issues with node when running npm install. Also I have trouble running sudo node on the .js files of the recipes.
At first when using node versions 9 and above I encounter the following problem on every recipe:
Then I tried using node version 8. I ran
npm install
with similar V8_DEPRECATED messages. I also did runnpm install ibm-watson
due to watson-developer-cloud being deprecated. After that I tried runningnode stt.js
,node conversation.js
.node stt.js
somehow works when not usingsudo
, butnode conversation.js
requires root-privileges as it is stated on the following message:Now by writing sudo before the command I get:
I have in mind that lots of issues are related to this problem, but I have tried many of the solutions people shared but none of them really worked for me.