blpapi-node icon indicating copy to clipboard operation
blpapi-node copied to clipboard

Specified module could not be found, when running examples

Open Bondifrench opened this issue 8 years ago • 4 comments

when trying both node FieldSearchRequest.js or node HistoricalDataRequest.js I get the following error:

$ node FieldSearchRequest.js
module.js:597
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: The specified module could not be found.
\\?\c:\Users\London\Apps\financejs\node_modules\blpapi\build\Release\blpapijs.node
    at Error (native)
    at Object.Module._extensions..node (module.js:597:18)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (c:\Users\London\Apps\financejs\node_modules\blpapi\blpapi.js:4:14)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)

Any advice? I have node v6.9.2 and npm v4.0.5 on a Windows 8.1 PC with BBG terminal logged in on the same machine.

Bondifrench avatar Dec 12 '16 12:12 Bondifrench

So I did a bit of research and from this thread I used a software called dependencywalker to look for what would be causing the error. I got this: image

So the first missing .dll module BLPAPI3_64.DLL I recognised, I saw it in here. However for some reason, it seems when installing blpapi the dll files are not copied there: image so when node-gyp configure build happens it doesn't put BLPAPI3_64.DLL in the right place (C:\Users\London\Apps\financejs\node_modules\blpapi\build), so I did manually.

After rebuilding blpapi it got rid of the previous problem but then: image

When trying to run the examples, I still got some errors, as BLPAPI3_64.DLL was only the first items in the list of DLLs that dependencywalker identified as missing. @apaprocki @ericvw Any ideas?

Bondifrench avatar Dec 14 '16 12:12 Bondifrench

Windows is tricky because there are a few variables. What version of MSVC do you have installed? If you run cl.exe from its binary directory, what is the exact version string reported?

apaprocki avatar Dec 14 '16 13:12 apaprocki

So I have Microsoft Visual Studio 14 and the string reported with cl.exe says: Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x86

Bondifrench avatar Dec 14 '16 19:12 Bondifrench

OK, finally managed to run the examples without errors!! Although I had BBG running on my machine and logged in there...I had to launch explicitly BBComm in the background for the examples to run and be able to connect to port 8194 otherwise I get the tcp connection failed mentioned in previous screens.

Might be nice to put a mention in the docs.

Bondifrench avatar Dec 15 '16 00:12 Bondifrench