noble-winrt
noble-winrt copied to clipboard
Problems with npm install
I am trying to use noble-winrt in my electron app.
I added the entry for "noble-winrt": "Timeular/noble-winrt#master"
in my package.json
When I try to run npm install, I get
fatal error C1083: Cannot open include file: 'winrt/Windows.Devices.Enumeration.h': No such file or directory (compiling source file ..\src\radio_watcher.cc)
Similar errors are seen for Blutetooth.GenericAttributeProfile.h and Bluetooth.Advertisement.h
I also tried running npm install in a directory different from my electron app (package.json entry was same as mentioned above). Same errors were seen.
I am running node v10.15.3 Windows 10.0.17763 Windows 10 SDK build 10.0.18362.0
Any updates on this? This issue is blocking the integration on noble-winrt in my app at a basic level.
I got the build to work with following combination:
- Visual Studio 2017 Community Edition
- Windows SDK 10.0.17134.12
VS 2017 installs Windows SDK 10.0.17763.132 and it can't be completely uninstalled. So in my case noble-winrt build always picks up 17763 and the build fails. I then open the binding.sln file in VS, re-target the solution to use 17134 and then build the solution using msbuild. After this the build succeeds. I haven't been able to get this to work seamlessly yet.
I too cannot compile this, is there maybe a compiled version somewhere that I can just download and use?
@LukasBombach there are prebuilds available in the [release section] (https://github.com/Timeular/noble-winrt/releases/tag/v0.0.3). Which node/electron version are you using?
@geovie none, I want to use this in node js / as an npm package.
I am rewriting noble from scratch and i want to add windows support
https://github.com/LukasBombach/sblendid/tree/master/packages/sblendid
@geovie I am already using your mac implementation, which is super useful and will definitely credit you for (currently the repo is wip and not released)
@LukasBombach Can you try latest master (v0.0.4)? It should have prebuilds for more nodejs/electron versions.
@geovie it 🎉 fricking 🎉 works 🎉
I can't tell you how happy I am! Thank you sooooo much!!! This is some awesome work!
Just a note: I had previously un-installed SDK 10.0.17763.0
and only had 10.0.17134.0
which was working great. With v0.0.4 it is necessary to do the opposite (install 10.0.17763.0
and uninstall 10.0.17134.0
)
As always @geovie thank you so much for the update.
@ELundby45 or mayyybe @geovie can you tell us what the requirements for compiling this are? Because I'd like to not come here and ask for every release and since I am not a windows developer at all I have no idea what's up. It was hard enough for me to make node-gyp
even run in the first place.
@LukasBombach I can tell you what I currently have running. Modules with native bindings on Windows have always been a source of trouble for me.
I have Visual Studio Community 2017 installed along with the Visual Studio 2017 Build tools. Once you have those installed, you should also have Visual Studio Downloader installed which will let you select individual components. For the latest version currently on master you need to have SDK version 10.0.17763.0
installed. See screenshot below.
I've currently been testing on node v10.13.0 and v12.0.0 and those have been working for me. If you clone master you should be able to npm install
then node-gyp rebuild
to test if your system can successfully compile. Once that is working, everything should be fine in another project when you npm install
this repo.
@ELundby45 Thank you so much!