Error: Cannot find module 'debug'
See original GitHub issueI have been trying on a raspberry pi zero (wired usb to rj45 which I use to ssh into it and the wireless for tuya-convert) with the both the lite raspbian and full raspbian, and no matter what I do, it doesn’t want to connect.
Looking at the smartconfig log file, I see this
pi@raspberrypi:~/tuya-convert/scripts $ cat smarthack-smartconfig.log
module.js:559
throw err;
^
Error: Cannot find module 'debug'
at Function.Module._resolveFilename (module.js:557:15)
at Function.Module._load (module.js:484:25)
at Module.require (module.js:606:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/pi/tuya-convert/scripts/smartconfig/smartconfig.js:16:15)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
I used a fresh install of the OS, then ran these commands, before I started with tuya-convert
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install network-manager sudo apt install git
Any ideas what I can try to make this work?
Also here is my smarthack web file
pi@raspberrypi:~/tuya-convert/scripts $ cat smarthack-web.log
^CTraceback (most recent call last):
File "./fake-registration-server.py", line 132, in <module>
main()
File "./fake-registration-server.py", line 128, in main
tornado.ioloop.IOLoop.current().start()
File "/usr/local/lib/python3.5/dist-packages/tornado/platform/asyncio.py", line 132, in start
self.asyncio_loop.run_forever()
File "/usr/lib/python3.5/asyncio/base_events.py", line 421, in run_forever
self._run_once()
File "/usr/lib/python3.5/asyncio/base_events.py", line 1388, in _run_once
event_list = self._selector.select(timeout)
File "/usr/lib/python3.5/selectors.py", line 445, in select
fd_event_list = self._epoll.poll(timeout, max_ev)
KeyboardInterrupt
Listening on port 80
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
Hi, I get this bug here Error: Cannot find module 'debug'
It could be an issue with your local node_modules directory. I would recommend deleting and re-installing it fresh. Then check your local ...
Read more >Cannot find module 'debug' · Issue #876 · koajs/koa - GitHub
I'm getting this error: Error: Cannot find module 'debug' at Function.Module._resolveFilename (module.js:325:15) at Function.Module.
Read more >Node.js debug doesn't work with Error: Cannot find module at ...
Hi, This worked prior 2016.2. Create a debug configuration for Node.js > add working directory value. Debug won't work with Error: Cannot find...
Read more >Error NPM global install cannot find module - Edureka
Hello @kartik,. I got this error Error: Cannot find module 'number-is-nan' whereas the module actually exists. It was due to a bad/ ...
Read more >How to debug a node issue that only occurs in 1 of 3 ...
The error I get (only on Azure) is: An unhandled exception occurred while processing the request. InvocationException: Cannot find module ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was previously having success but for the last few days can’t get any sonoff devices to connect to vtrust-flash to start the process. My phone connects to it, but the sonoff devices (bulb, switch) just flash in pairing mode until timing out. I noticed this same "cannot find module ‘debug’ error so I ran npm -i inside scripts/smartconfig as suggested. That seemed fine except for two warnings:
Running start_flash.sh I now get this:
This is on an ubuntu 16.04 server machine.
UPDATE Success by using the python version mentioned above. To get that to work it was necessary to also do:
apt-get install python3-crypto
I gave up on my raspberry pi zero w, and used a laptop to flash my switches, so I am good now. Thanks for your help