-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
serialport + nodewebkit version 0.10.2 #374
Comments
I have the same error on MacOS 64-bit. I catch the error bellow:
and into build folder I see the other version of build - node-v11-darwin-x64 |
I got the same, but I changed the folders to match what he was looking for and got the above error (i.e. it can find it, but its not compatible) |
I found an article: https://github.com/rogerwang/node-webkit/wiki/Build-native-modules-with-nw-gyp using
I make a needed version which place in when I try to create app and launch it I catch the error - app try to load this package from other dir - node-webkit-v14. |
are you able to compile with -runtime=node-webkit and --target=0.10.2 |
On the other hand, node-webkit 0.10.2 is based on Node.js v0.11.13. You should probably try another target, such as node-webkit v0.8.6. |
On the gripping hand, someone should really write a pull request that alters |
the problem is that I also need the full screen video capability that the 0.10.2 supports (and the 0.8.6) does not. When I try to use the complied serialport from v0.8.6 I get the "can't find procedure" error mentioned above. Are there any plans to support the 0.11.13 version? Can you shed a light on why this is'nt compiling and what is the barrier to support the 0.11.13. I may be able to contribute and solve the issues... |
Somehow I can't explain this lack of support — even to myself. Because, look, currently serialport seems to use version 1.3.0 of the That nan's version is known (since May 2014!) to not support Node 0.11 versions prior to 0.11.13, but supports newer versions (i.e. it supports Node.js 0.11.13, which is precisely the version node-webkit 0.10.2 is based on). However, serialport's Something's clearly wrong here. |
Ok, finally it works for me. I make the following:
After that steps it works fine in my system (correctly build and run) |
Suppose that serialport's If that's true, then why exactly has @tadjik1 got a folder named Currently serialport depends on By running Now let's go further to the source code: node-pre-gyp became v0.5.19 in the commit mapbox/node-pre-gyp@fa59fdc, and its source code is in the following state after that commit:
And it explains why @tadjik1 observed the app trying a folder Then why the commands That's because the Who did this change? That was me in mapbox/node-pre-gyp@53f3e38. I had a good reason for this change: node-webkit's ABI changes in every node-webkit's version, and thus Node.js ABI version is irrelevant. Serialport's bundled |
following your very helpful explanation I have upgraded the node-pre-gyp version in serial port. however trying to build it I got build errors: |
tadjik1, you write target=0.3.3 ? is that what you used? which node-webkit version are you working with. |
@redramster By the way, what is the tool that you use to build the addon? (Microsoft Visual Studio Express 2010, Visual Studio Express 2013 for Windows Desktop, anything else?) I am asking this because we have yet another contradiction in READMEs:
|
That won't help. Platform differences. He has said he's building for MacOS 64-bit, while you're on Windows. |
of course you are right :( |
I suppose you could use the (In your case that would be |
However, that That's bad because it means I couldn't search for it in nw-gyp (GitHub does not support searches in the source code of a forked repository). |
Thanks. I tried it, but still can't compile. |
please sorry, it's my typo. I wrote current version, 0.10.2 try to execute next steps:
and if you catch an error then run node-pre-gyp. and read this - https://github.com/rogerwang/node-webkit/wiki/Build-native-modules-with-nw-gyp |
@kraag22 Though the screenshot does not contain a full log, the |
@Mithgol thanks for answer. I looked, that nw-gyp recommends python 2.7.3. I have 2.7.5 version installed on my Windows. I also updated image with log, so now is complete. Maybe there is some problem with version of nw-gyp. In screenshot command "nw-gyp -v" returns "v0.7.3-4", but when I try it directly in command line, it correctly returns newest version number "v0.12.2" |
@Mithgol it was because old version of nw-gyp was used. After I used 0.12.2, it was OK. I needed to use node-pre-gyp. So node webkit 0.10.4 can work with node serialport 1.4.6 both on windows and mac. Only problem is, that I need to manually rename released version. (directories have wrong versions - node.js version vs. node-webkit version) mapbox/node-pre-gyp#104 |
hey kraag22 RamsterBuilding the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. Failed to execute 'nw-gyp.cmd rebuild --name=serialport --configuration=Release --module_name=serialport --version=1.4.5 --major=1 --minor=4 --patch=5 --runtime=node-webkit --node_abi=node-webkit-v0.10.4 --target=0.10.4 --platform=win32 --target_platform=win32 --arch=ia32 --target_arch=ia32 --module_main=./serialport --host=https://node-serialport.s3.amazonaws.com/ --module_path=C:\Program Files (x86)\nodejs\node_modules\serialport\build\serialport\v1.4.5\Release\node-webkit-v0.10.4-win32-ia32 --module=c:\Program Files (x86)\nodejs\node_modules\serialport\build\serialport\v1.4.5\Release\node-webkit-v0.10.4-win32-ia32\serialport.node --remote_path=./serialport/v1.4.5/Release/ --package_name=node-webkit-v0.10.4-win32-ia32.tar.gz --staged_tarball=build\stage\serialport\v1.4.5\Release\node-webkit-v0.10.4-win32-ia32.tar.gz --hosted_path=https://node-serialport.s3.amazonaws.com/serialport/v1.4.5/Release/ --hosted_tarball=https://node-serialport.s3.amazonaws.com/serialport/v1.4.5/Release/node-webkit-v0.10.4-win32-ia32.tar.gz --msvs_version=2010' (1) |
I am having the same issue. I managed to get this to build correctly for nw v0.10.4 with $ node-pre-gyp rebuild --runtime=node-webkit --target=0.10.4 --target_arch=ia32 and for v0.8.6 with $ node-pre-gyp rebuild --runtime=node-webkit --target=0.8.6 --target_arch=ia32 both of these work with providing the list of available serial ports but I cannot open a port. I always get Access denied error. |
This ticket has grown out of control and seems to have taken a definitive passive aggressive to aggressive aggressive stance. Would it be fair enough to sum up this ticket with #383 in that the issue is getting node-serialport and node-webkit (and their respective dependencies) working OOTB? |
Couple of follow ups just to make sure everyone is on the same page, please add tickets under these assumptions:
Can someone please verify that the current version still exhibits the issue and exactly what and how to reproduce with code sample ideally the issue. thank you - Chris |
I can verify (see the other issue for more info.) Basically, I use this tester I do this to make it work on mac:
Then, I need to run with ia32 runtime:
or x64 runtime:
Both work fine. |
@konsumer That was awesome. Thank you! |
HI. I faced this issue too. Here is my log from npm
|
@mike1808 serialport 1.5.0 uses nan 1.6.2, and nan (since version 1.6) requires a newer nw.js version (see nodejs/nan#238). Try nw.js version 0.12.0-alpha3. |
konsumer, thanx for the #374 (comment) |
Huge thanks to everyone above for ironing out this process for me! I did this today and wanted to update @konsumer's wonderful wrap up #374 (comment) with the changes needed from #374 (comment) Grab @konsumer's code, put into a directory nwktest, cd to that directory First nobody mentioned installing these globally but they're being referenced that way, so I wanted to:
Then as stated:
Next go to the serialport source directory and rebuild there with the 12.0 alpha target
Note I didnt have to move things around anymore. Then download and unpack the nwjs executable and run it against the nwktest directory
|
On windows (32bits)
I get the following error: |
On Windows 7 64bits CMD: OUTPUT: |
Instead of the rebuild command, i've used: node-pre-gyp clean I think now building correctly, but if I execute the app now I've got an error on js console saying: Uncaught Error: Cannot find module 'serialport' |
Try doing the rename step ( On mac/linux it will be like this:
|
My way to get it running on windows 7 64bit with node 0.12.2 and node-webkit 0.12.0
That's it and it worked perfectly for me. |
This is due to the way nw.js/node-webkit changes the Node-ABI. This is not an issue with serialport, review this for more information: https://github.com/nwjs/nw.js/wiki/Using-Node-modules#3rd-party-modules-with-cc-addons Closing |
Sorry to rip open old wounds but after cracking my head over this for a while I found a fix for myself.
And it works. |
@dennisdevulder thanks so much this one helped me out soooo much :) |
@dennisdevulder Thanks, it worked for me. I needed also |
I am trying to work with node-webkit's latest version which is built on nodes 0.11.13
I understand from your comment that there is a problem but I was not sure on its nature. However, I was able to compile serialport using nw-pre-gyp but when I try to use it (require("serialport") I get the following error:
Error: The specified procedure could not be found.
d:\Edu Quest (x86)\node_modules\serialport\build\serialport.node
message: "The specified procedure could not be found.
↵d:\Edu Quest (x86)\node_modules\serialport\build\serialport.node"
stack: "Error: The specified procedure could not be found.
↵d:\Edu Quest (x86)\node_modules\serialport\build\serialport.node↵ at Error (native)↵ at Module.load (module.js:352:32)↵ at Function.Module._load (module.js:308:12)↵ at Module.require (module.js:360:17)↵ at require (module.js:376:17)↵ at Object. (D:\Edu Quest (x86)\node_modules\serialport\serialport.js:12:25)↵ at Module._compile (module.js:452:26)↵ at Object.Module._extensions..js (module.js:470:10)↵ at Module.load (module.js:352:32)↵ at Function.Module._load (module.js:308:12)"
I tried to compile using nodes 0.11.10 using nw-pre-gyp. compile was successful, but I still get the same error.
Is there any workaround?
Thanks
Ramster
The text was updated successfully, but these errors were encountered: