addaleax / lzma-native

Node.js interface to the native liblzma compression library (.xz file format, among others)
MIT License
105 stars 37 forks source link

lzma-native does not download liblzma.dll on Windows #65

Closed Garethp closed 4 years ago

Garethp commented 6 years ago

When running npm install --save lzma-native on Windows 10, and then trying to require it, when it requires the .node binding it throws the following error:

module.js:678
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: The specified module could not be found.
\\?\C:\Users\[Folder]\node_modules\lzma-native\binding\lzma_native.node
    at Object.Module._extensions..node (module.js:678:18)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)
    at Module.require (module.js:593:17)
    at require (internal/module.js:11:18)
    at C:\Users\[Folder]\node_modules\lzma-native\index.js:14:14
    at Object.<anonymous> (C:\Users\[folder]\node_modules\lzma-native\index.js:626:3)
    at Module._compile (module.js:649:30)
    at Object.Module._extensions..js (module.js:660:10)

Looking at the binding/ directory, only lzma_native.node appears. The work around (for me) was to install v3.0.8 (which then grabbed the .dll file, then copy that in to the bindings/ directory for the lzma-native version I want to use

addaleax commented 4 years ago

The build situation has improved a lot as of lzma-native@6.0.0, so these kinds of issues should hopefully be less frequent now.