jduncanator / node-diskusage

Node.js bindings around platform specific disk usage interfaces.
MIT License
155 stars 51 forks source link

Module not found [Windows] #10

Closed jerroddixon closed 8 years ago

jerroddixon commented 8 years ago

I'm rebuilding ffi and ref on Windows using nw-gyp, and those seem to be building correctly, however when I require 'diskusage' I get the following error message.

"Error: The specified module could not be found. C:\Users\AppData\Local\Temp\nw50196_2060\node_modules\diskusage\node_modules\ref\build\Release\binding.node at Error (native) at Module.load (module.js:346:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:356:17) at require (module.js:375:17) at bindings (C:\Users\AppData\Local\Temp\nw50196_2060\node_modules\diskusage\node_modules\ref\node_modules\bindings\bindings.js:76:44) at Object. (C:\Users\AppData\Local\Temp\nw50196_2060\node_modules\diskusage\node_modules\ref\lib\ref.js:5:47) at Module._compile (module.js:451:26) at Object.Module._extensions..js (module.js:469:10) at Module.load (module.js:346:32)"

I've been using the same setup on a Linux machine for a while now with no issue, but I'm trying to work on adding Windows support (specifically working on Windows 7 using Visual Studio 2015) and this error keeps occurring.

I've managed to fix it by renaming the .exe to nw.exe and it works just fine, but it feels like that's unintentional. I'm not entirely sure where the requirement that it's named 'nw.exe' exists. Is this a 'diskusage' issue, or would I be better referring this to 'ref'?

jerroddixon commented 8 years ago

Ignore me! As much as I hate to admit it, turns out part of the issue I was having was that node.js wasn't up-to-date on my machine. Running into different errors now, but unrelated to this.

jduncanator commented 8 years ago

This also looks like an issue with ref dependency. Might be relevant to #9. I'm aware that updating the ref library may affect backwards compatibility with older node versions, so I want to avoid changing the dependencies around too much.