Closed hepcat72 closed 3 years ago
Are you running a stock version of Node.js? That error indicates that require('fs').realpath.native
is undefined on your system
This issue appears to be restricted to when you start homebridge using pm2. I have worked around the issue by switching to hb-service.
Yeah, something must be serving a non-standard version of fs
there; not an issue with fs-extra.
I encountered this immediately upon updating to Node v14.18.1. I don't actually know what fs is, or fs-extra for that matter. Could it be a permissions issue?
fs
is Node's native filesystem module. fs-extra
is a wrapper around it that adds some additional methods; but apparently somehow we're getting a non-standard version of `fs.
I tried to check the version of fs, but I could not find it using npm ls
. I just (re-?) installed it. Not sure how it could have gone missing, but I did note during my update process, there was a moment when one of the updates inadvertently removed a ton of stuff and I'd had to re-npm-install it all. So perhaps fs was removed... Not sure. I'll play around with it later and see if things work now after the fs install...
fs
is a native node module, you don't need to install it; and there's no way it could be removed.
Huh. OK. Well, obviously I don't know what I'm doing, so thanks for the hand-holding. Very kind. I'll have to invest some more mental effort to figure out how this happened. I probably should start my whole pi over from scratch.
Hi @hepcat72.
I have the same issue. Did you solve yours somehow?
No, I did not, but only because I simply haven't tried to figure it out. I just worked around the issue by switching from pm2 to hb-service to manage my homebridge process, though I am also having issues with node-red running via pm2. I can start it up, but after a reboot, it doesn't run and I have to start it manually. I don't know if it's related to fs* though - and I discovered that I had 2 competing pm2 installations (root vs pi). I uninstalled the root one and crossed my fingers, but I haven't checked with a reboot since then.
But take all this with a huge grain of salt because I don't know what the hell I'm doing. I probably used sudo somewhere where I shouldn't have or something. I'm too busy with a bathroom remodel to figure it out, so I'm just treading water until I have time to set up my new pi 4.
fs-extra
version::I hope this is the right place to report this issue. I see this error in my homebridge installation (which installs fs-extras as a dependency I believe) constantly in my homebridge error log:
What can I do to address this?