Open slayer1021 opened 5 years ago
Error: Cannot find module '../native/noble_mac'
@slayer1021 @kenken64 Which node version are you using? How are you installing noble-mac
?
You might want to take a look at abandonware/noble which has the bindings of this repo integrated.
I experienced this issue on both this repo & on abandonware/noble, and it was because I am using webpack which doesn't play nicely with the binding.node
file, or in this repos case, the noble_mac.node
file. I was able to fix it by forking the repo and using https://github.com/webpack-contrib/node-loader in binding.js
const NobleMac = require('node-loader!./native/binding.node').NobleMac;
I think there could potentially be a change to allow you to use node-loader in your project and pass the binding along as an option which starting noble.
@blamay Could you specify noble-mac
as external in webpack, then it should work...
Specifying noble (or in my case, @abandonware/noble) as external does fix this problem for me.
@blamay Possibly you don't have added in webpack file to load the .node extensions. ... resolve: { extensions: [".js", ".css",".node","..."], }, ...
Followed instructions for installation but keep getting the error cannot find module '../native/noble_mac' , did check the location and no file exists in the location.