Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node.js 12 Support #277

Closed
marcoschmidt79 opened this issue Apr 29, 2019 · 24 comments
Closed

Node.js 12 Support #277

marcoschmidt79 opened this issue Apr 29, 2019 · 24 comments

Comments

@marcoschmidt79
Copy link

Error with node v12.1.0

Apr 29 18:21:40 homebridge homebridge[1812]: [2019-4-29 18:21:40] [homebridge-config-ui-x] Error: Cannot find module '../build/Debug/pty.node'
Apr 29 18:21:40 homebridge homebridge[1812]: Require stack:
Apr 29 18:21:40 homebridge homebridge[1812]: - /usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/node-pty-prebuilt-multiarch/lib/utils.js
Apr 29 18:21:40 homebridge homebridge[1812]: - /usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js
Apr 29 18:21:40 homebridge homebridge[1812]: - /usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/node-pty-prebuilt-multiarch/lib/index.js
Apr 29 18:21:40 homebridge homebridge[1812]: - /usr/local/lib/node_modules/homebridge-config-ui-x/dist/main.js
Apr 29 18:21:40 homebridge homebridge[1812]: - /usr/local/lib/node_modules/homebridge-config-ui-x/dist/bin/fork.js

@oznu oznu changed the title Error: Cannot find module '../build/Debug/pty.node' Node.js 12 - Error: Cannot find module '../build/Debug/pty.node' Apr 29, 2019
@oznu
Copy link
Member

oznu commented Apr 30, 2019

⚠️

https://github.com/Microsoft/node-pty/issues/279

Node.js 12 is not supported by this plugin until the issue above is resolved.

@oznu oznu pinned this issue Apr 30, 2019
@oznu oznu changed the title Node.js 12 - Error: Cannot find module '../build/Debug/pty.node' Node.js 12 Support Apr 30, 2019
@oznu oznu changed the title Node.js 12 Support ⚠️ Node.js 12 Support Apr 30, 2019
@oznu oznu changed the title ⚠️ Node.js 12 Support Node.js 12 Support Apr 30, 2019
@robertgranholm
Copy link

Shoot...upgraded node to get ffmeg homebridge plugin working and then ran into this....waiting in the wings for Node 12 support

@realdannys
Copy link

Damn, me too.

@oznu
Copy link
Member

oznu commented May 14, 2019

This should be resolved in 4.4.1 which is in beta. I'm looking for a couple people to test this before publishing to everyone.

The beta release can be installed with this command:

sudo npm install -g --unsafe-perm homebridge-config-ui-x@next

@marcoschmidt79
Copy link
Author

This should be resolved in 4.4.1 which is in beta. I'm looking for a couple people to test this before publishing to everyone.

Hello, thats great, i tasted with node 12.2.0 and config-ui-x 4.4.1-beta.1 and it works perfectly. thank you very much.

@robertgranholm
Copy link

Hmm I installed the beta, homebridge started it up okay, no errors this time, however I still get a 402 bad gateway when trying to load the ui address. Here's load up - http://getsupport.itarsenal.com/snaps/Monosnap_2019-05-14_10-41-20.png

@oznu
Copy link
Member

oznu commented May 16, 2019

@robertgranholm 502 bad gateway? That sounds like a reverse proxy issue.

@oznu oznu closed this as completed May 16, 2019
@oznu
Copy link
Member

oznu commented May 16, 2019

Resolved in v4.4.1

@RMCob
Copy link

RMCob commented May 16, 2019

Updated to 4.4.1. Then updated node from 8.16 to 12.2.
Got the Cannot find module '../build/Debug/pty.node' error.
Reverted node back to 8.16 and everything ok.

@marcoschmidt79
Copy link
Author

marcoschmidt79 commented May 16, 2019

update first node and then npm rebuild

@RMCob
Copy link

RMCob commented May 16, 2019

Not sure what you mean by "npm rebuild".
I totally removed homebridge-config-ui-x and nodejs. Installed the latest node (12.2) via apt-install.
Installed the latest homebridge-config-ui-x via npm. Still get the same error. When I revert nodejs back to 8.16 homebridge-config-ui-x starts with no issues.

@marcoschmidt79
Copy link
Author

please open new issue with your problem and log from install and homebridge-start. my problem is not your problem

@janthony6
Copy link

I get the same error.

[5/16/2019, 21:40:23] [homebridge-config-ui-x] Error: Cannot find module '../build/Debug/pty.node'
Require stack:

  • /usr/lib/node_modules/homebridge-config-ui-x/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js
  • /usr/lib/node_modules/homebridge-config-ui-x/node_modules/node-pty-prebuilt-multiarch/lib/index.js
  • /usr/lib/node_modules/homebridge-config-ui-x/dist/main.js
  • /usr/lib/node_modules/homebridge-config-ui-x/dist/bin/fork.js

@oznu
Copy link
Member

oznu commented May 17, 2019

If you're getting pty.node errors, then the npm command would have errored out during the fresh installation of the plugin you did after upgrading a major node.js version.

# cleanup
sudo npm uninstall -g homebridge-config-ui-x

# reinstall
sudo npm install -g --unsafe-perm homebridge-config-ui-x

@janthony6
Copy link

still crashing after trying that but with less errors. getting this:

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted

@janthony6
Copy link

okay i figured it out. nest was busted on node 12

@oznu oznu unpinned this issue Jun 6, 2019
@pasna
Copy link

pasna commented Aug 2, 2019

Hi,
Any news on error fixed for node12?

@oznu
Copy link
Member

oznu commented Aug 2, 2019

This was fixed some time ago.

@mentaluproar
Copy link

Not fixed for me. Same problem.

@oznu
Copy link
Member

oznu commented Oct 24, 2019

After doing a major version upgrade you need to rebuild or reinstall:

# cleanup
sudo npm uninstall -g homebridge-config-ui-x

# reinstall
sudo npm install -g --unsafe-perm homebridge-config-ui-x

@mentaluproar
Copy link

tried rebuild. didn't work. Tried removing and reinstalling. didn't work.

@oznu
Copy link
Member

oznu commented Oct 25, 2019

@mentaluproar
Copy link

I removed the plugin and tried launching again. Homebridge still tries to load it, even though its not installed and its not in the config.json. I'm going to dig a little more. It's possible this problem is my rig and not your plugin.

@mentaluproar
Copy link

Yea, node is totally broken on my system. Ignore this. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants