blpapi-node
blpapi-node copied to clipboard
Specified module could not be found, when running examples
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.
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:
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:
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:
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?
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?
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
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.