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

win7 nw.js 0.12.3 can't find SerialPort #665

Closed
CheneyPeng opened this issue Feb 3, 2016 · 8 comments
Closed

win7 nw.js 0.12.3 can't find SerialPort #665

CheneyPeng opened this issue Feb 3, 2016 · 8 comments

Comments

@CheneyPeng
Copy link

CheneyPeng commented Feb 3, 2016

I rebuild SerialPort as node-pre-gyp rebuild --runtime=node-webkit --target=0.12.3
and i use like
var com = require("serialport"); com.list(function (err, ports) { ports.forEach(function(port) {console.log(port.comName); }); }); var s = new com.SerialPort("COM3");
i can get the SerialPort list
but there has a error :
Uncaught TypeError: undefined is not a function said new com.SerialPort("COM3") undefined.
i don't know how to fix it. can help me? THX!!

@JuppySingh
Copy link

I got the same error and after numerous combinations got it to work finally. Attached is the x64 build which you can try.

serialport.zip

@reconbot
Copy link
Member

reconbot commented Apr 6, 2016

Please try the latest beta, I'm let to believe the upgrade to Nan might help this. We've also fixed a few windows issues. #733 Please try it out [email protected] and report back!

@reconbot
Copy link
Member

reconbot commented Apr 6, 2016

@JuppySingh would you be able to share what you did to make it work?

@JuppySingh
Copy link

I am able to install [email protected] with the latest Node x64 v5.10.1.

I then try and rebuild serialport for nw.js using the following commands:

node-pre-gyp configure --runtime=node-webkit --target=0.12.3
node-pre-gyp build --runtime=node-webkit --target=0.12.3

However, when I try and run a test. I get the following error:

node_modules\serialport\node_modules\bindings\bindings.js:83 Uncaught Error: Module version mismatch. Expected 43, got 47.

@reconbot
Copy link
Member

reconbot commented Apr 7, 2016

can you do the same thing again but remove the out folder and see what happens?

@reconbot
Copy link
Member

reconbot commented Apr 7, 2016

I think I have this solved in #737 but you testing that will confirm

@JuppySingh
Copy link

It is working fine now. Thanks!

@reconbot
Copy link
Member

reconbot commented Apr 8, 2016

OK cool! Il have this fixed in beta5 or the next release!

@reconbot reconbot closed this as completed Apr 8, 2016
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants