Skip to content
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.

Issue when "node-gyp configure build" #77

Closed
Bondifrench opened this issue Dec 10, 2016 · 2 comments
Closed

Issue when "node-gyp configure build" #77

Bondifrench opened this issue Dec 10, 2016 · 2 comments

Comments

@Bondifrench
Copy link

Hi,

after successfully installing the windows build tools and trying to install blpapi, I got the following error:

npm install --save blpapi
npm WARN package.json financejs@0.0.1 No repository field.
/
> blpapi@1.2.0 install c:\Users\London\Apps\financejs\node_modules\blpapi
> node-gyp configure build


c:\Users\London\Apps\financejs\node_modules\blpapi>if not defined npm_config_node_gyp (node "c:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure build )  else (node  configure build )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  blpapijs.cpp
..\blpapijs.cpp(176): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data [c:\Users\London\Apps\financejs\ node_modules\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(621): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_module s\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(719): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_module s\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(785): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_module s\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(828): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_module s\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(940): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_module s\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(961): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data [c:\Users\London\Apps\financejs\ node_modules\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(989): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data [c:\Users\London\Apps\financejs\ node_modules\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(1002): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data [c:\Users\London\Apps\financejs \node_modules\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(1057): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data [c:\Users\London\Apps\financejs \node_modules\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(1136): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_modul es\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(1249): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_modul es\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(1263): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [c:\Users\London\Apps\financejs\ node_modules\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(1281): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [c:\Users\London\Apps\financejs\node _modules\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(1290): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [c:\Users\London\Apps\financejs\ node_modules\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(1402): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [c:\Users\London\Apps\financejs\node _modules\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(1616): warning C4244: 'argument': conversion from '__int64' to 'const int', possible loss of data [c:\Users\London\Apps\finance js\node_modules\blpapi\build\blpapijs.vcxproj]
..\blpapijs.cpp(1630): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [c:\Users\London\Apps\financejs\node _modules\blpapi\build\blpapijs.vcxproj]
  win_delay_load_hook.c
c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(31): error C2373: '__pfnDliNotifyHook2': redefinition;  different type modifiers [c:\Users\London\Apps\financejs\node_modules\blpapi\build\blpapijs.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNotifyHook2'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd c:\Users\London\Apps\financejs\node_modules\blpapi
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "blpapi" npm ERR! node v4.2.3
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE

npm ERR! blpapi@1.2.0 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the blpapi@1.2.0 install script 'node-gyp configure build'.
npm ERR! This is most likely a problem with the blpapi package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls blpapi
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     c:\Users\London\Apps\financejs\npm-debug.log

It seems this:

c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(31): error C2373: '__pfnDliNotifyHook2': redefinition;  different type modifiers [c:\Users\London\Apps\financejs\node_modules\blpapi\build\blpapijs.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNotifyHook2'

seems to cause the problem, any advice?

I saw that error referenced here that asks to install npm@next, which I did, but still got the same error at the end of the day.

Would appreciate feedback, thx

@apaprocki
Copy link
Member

It appears this would fix it:

You must have at least 3.10.8 version of NPM. This is critical.
npm -g install npm@next

Make sure Node globally uses the same version 2015
npm config set msvs_version 2015 --global

Delete node_modules directory in your project
npm install

and later someone said:

if you are working on an old version like I was, a simple npm install -g npm (without the @next) worked.

You can see from the log your version of npm is ancient:

npm  v2.14.7

@Bondifrench
Copy link
Author

Thanks @apaprocki ,
As I said earlier I did npm -g install npm@next before but for some reason, it did not actually update npm.
I believe it has to with the Roaming folder as described here, at the end, I had to upgrade my version of Node and then I got the latest version of NPM.
A line in the docs might be handy.

The installation of blpapi-node was successful afterwards.

Just to let you know, there are lots of warnings coming with the installation:

> blpapi@1.2.0 install c:\Users\London\Apps\financejs\node_modules\blpapi                                                                       
> node-gyp configure build                                                                                                                      
                                                                                                                                                
                                                                                                                                                
c:\Users\London\Apps\financejs\node_modules\blpapi>if not defined npm_config_node_gyp (node "C:\Users\London\AppData\Roaming\npm\node_modules\np
m\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure build )  else (node "" configure build )                             
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.                                     
  blpapijs.cpp                                                                                                                                  
  win_delay_load_hook.cc                                                                                                                        
..\blpapijs.cpp(176): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data [c:\Users\London\Apps\financejs\ 
node_modules\blpapi\build\blpapijs.vcxproj]                                                                                                     
..\blpapijs.cpp(559): warning C4996: 'v8::Value::ToInt32': was declared deprecated [c:\Users\London\Apps\financejs\node_modules\blpapi\build\bl 
papijs.vcxproj]                                                                                                                                 
  C:\Users\London\.node-gyp\6.9.2\include\node\v8.h(8202): note: see declaration of 'v8::Value::ToInt32'                                        
..\blpapijs.cpp(621): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_module 
s\blpapi\build\blpapijs.vcxproj]                                                                                                                
..\blpapijs.cpp(719): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_module 
s\blpapi\build\blpapijs.vcxproj]                                                                                                                
..\blpapijs.cpp(785): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_module 
s\blpapi\build\blpapijs.vcxproj]                                                                                                                
..\blpapijs.cpp(828): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_module 
s\blpapi\build\blpapijs.vcxproj]                                                                                                                
..\blpapijs.cpp(940): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_module 
s\blpapi\build\blpapijs.vcxproj]                                                                                                                
..\blpapijs.cpp(961): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data [c:\Users\London\Apps\financejs\ 
node_modules\blpapi\build\blpapijs.vcxproj]                                                                                                     
..\blpapijs.cpp(989): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data [c:\Users\London\Apps\financejs\ 
node_modules\blpapi\build\blpapijs.vcxproj]                                                                                                     
..\blpapijs.cpp(1002): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data [c:\Users\London\Apps\financejs 
\node_modules\blpapi\build\blpapijs.vcxproj]                                                                                                    
..\blpapijs.cpp(1057): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possible loss of data [c:\Users\London\Apps\financejs 
\node_modules\blpapi\build\blpapijs.vcxproj]                                                                                                    
..\blpapijs.cpp(1136): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_modul 
es\blpapi\build\blpapijs.vcxproj]                                                                                                               
..\blpapijs.cpp(1249): warning C4003: not enough actual parameters for macro 'BLPAPI_EXCEPTION_IMPL' [c:\Users\London\Apps\financejs\node_modul 
es\blpapi\build\blpapijs.vcxproj]                                                                                                               
..\blpapijs.cpp(1263): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [c:\Users\London\Apps\financejs\ 
node_modules\blpapi\build\blpapijs.vcxproj]                                                                                                     
..\blpapijs.cpp(1281): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [c:\Users\London\Apps\financejs\node 
_modules\blpapi\build\blpapijs.vcxproj]                                                                                                         
..\blpapijs.cpp(1290): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [c:\Users\London\Apps\financejs\ 
node_modules\blpapi\build\blpapijs.vcxproj]                                                                                                     
..\blpapijs.cpp(1278): warning C4996: 'v8::Object::ForceSet': was declared deprecated [c:\Users\London\Apps\financejs\node_modules\blpapi\build 
\blpapijs.vcxproj]                                                                                                                              
  C:\Users\London\.node-gyp\6.9.2\include\node\v8.h(2696): note: see declaration of 'v8::Object::ForceSet'                                      
..\blpapijs.cpp(1402): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [c:\Users\London\Apps\financejs\node 
_modules\blpapi\build\blpapijs.vcxproj]                                                                                                         
..\blpapijs.cpp(1616): warning C4244: 'argument': conversion from '__int64' to 'const int', possible loss of data [c:\Users\London\Apps\finance 
js\node_modules\blpapi\build\blpapijs.vcxproj]                                                                                                  
..\blpapijs.cpp(1630): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [c:\Users\London\Apps\financejs\node 
_modules\blpapi\build\blpapijs.vcxproj]                                                                                                         
..\blpapijs.cpp(1637): warning C4996: 'v8::Object::ForceSet': was declared deprecated [c:\Users\London\Apps\financejs\node_modules\blpapi\build 
\blpapijs.vcxproj]                                                                                                                              
  C:\Users\London\.node-gyp\6.9.2\include\node\v8.h(2696): note: see declaration of 'v8::Object::ForceSet'                                      
..\blpapijs.cpp(1640): warning C4996: 'v8::Object::ForceSet': was declared deprecated [c:\Users\London\Apps\financejs\node_modules\blpapi\build 
\blpapijs.vcxproj]                                                                                                                              
  C:\Users\London\.node-gyp\6.9.2\include\node\v8.h(2696): note: see declaration of 'v8::Object::ForceSet'                                      
..\blpapijs.cpp(1643): warning C4996: 'v8::Object::ForceSet': was declared deprecated [c:\Users\London\Apps\financejs\node_modules\blpapi\build 
\blpapijs.vcxproj]                                                                                                                              
  C:\Users\London\.node-gyp\6.9.2\include\node\v8.h(2696): note: see declaration of 'v8::Object::ForceSet'                                      
..\blpapijs.cpp(1690): warning C4996: 'v8::Object::ForceSet': was declared deprecated [c:\Users\London\Apps\financejs\node_modules\blpapi\build 
\blpapijs.vcxproj]                                                                                                                              
  C:\Users\London\.node-gyp\6.9.2\include\node\v8.h(2696): note: see declaration of 'v8::Object::ForceSet'                                      
..\blpapijs.cpp(1693): warning C4996: 'v8::Object::ForceSet': was declared deprecated [c:\Users\London\Apps\financejs\node_modules\blpapi\build 
\blpapijs.vcxproj]                                                                                                                              
  C:\Users\London\.node-gyp\6.9.2\include\node\v8.h(2696): note: see declaration of 'v8::Object::ForceSet'                                      
..\blpapijs.cpp(1696): warning C4996: 'v8::Object::ForceSet': was declared deprecated [c:\Users\London\Apps\financejs\node_modules\blpapi\build 
\blpapijs.vcxproj]                                                                                                                              
  C:\Users\London\.node-gyp\6.9.2\include\node\v8.h(2696): note: see declaration of 'v8::Object::ForceSet'                                      
     Creating library c:\Users\London\Apps\financejs\node_modules\blpapi\build\Release\blpapijs.lib and object c:\Users\London\Apps\financejs\n 
  ode_modules\blpapi\build\Release\blpapijs.exp                                                                                                 
  Generating code                                                                                                                               
  Finished generating code                                                                                                                      
  blpapijs.vcxproj -> c:\Users\London\Apps\financejs\node_modules\blpapi\build\Release\\blpapijs.node                                           
  blpapijs.vcxproj -> c:\Users\London\Apps\financejs\node_modules\blpapi\build\Release\blpapijs.pdb (Full PDB)                                  
financejs@0.0.1 c:\Users\London\Apps\financejs                                                                                                  
`-- blpapi@1.2.0                                                                                                                                
  `-- custom-error-generator@7.0.0                                                                                                              

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants