rwaldron / johnny-five

JavaScript Robotics and IoT programming framework, developed at Bocoup.
http://johnny-five.io
Other
13.29k stars 1.77k forks source link

Error: Cannot find module 'firmata' #1777

Open dasamepu opened 2 years ago

dasamepu commented 2 years ago

Hello, I was trying to run the example but when I write in the command-line "node app.js" it shows me "Error: Cannot find module 'firmata'".

I'm not sure but I think it's because the file "C:\Users\user\AppData\Local\Temp\build123.tmp\StandardFirmata.cpp.hex" doesn't exist in my PC and in the Aduino IDE console log at bottom it shows me this file: "C:\Users\user\AppData\Local\Temp\arduino_build_560749/StandardFirmata.ino.elf".

Maybe that is the reason beacause is not working or not, but I'll be really thankfull if you help me. Error_Cannot_find_module_firmata

dtex commented 2 years ago

That particular error message isn't related to the Arduino code, it's just saying it can't find the node.js module "firmata". That should have been installed when you installed johnny-five so it's a bit of a mystery. Anything non-standard about your install process? Were there any errors when you ran npm i johnny-five? I assume this is running on Windows and connected to an Arduino via USB correct? If so try npm i firmata from within the proteusnode directory.

dasamepu commented 2 years ago

Yes, when I install johnny-five it looks like it wasn't intalled properly. npm_install_johnny-five

And when I install firmata it also shows me errors and says that I have should have to install python, but why if I won't use python? npm_intall_firmata_1 npm_intall_firmata_2

Amaranthusss commented 2 years ago

I have the same problem, at this moment could only put manually firmata library data to node_modules and it helps.

WyattSanders commented 11 months ago

I have the same problem, at this moment could only put manually firmata library data to node_modules and it helps.

I've found the solution here: https://github.com/rwaldron/johnny-five/issues/1807#issuecomment-1809561715