Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install fails with error c2373 with vs2015 update 3 #263

Closed
d3x0r opened this issue Nov 10, 2016 · 3 comments
Closed

npm install fails with error c2373 with vs2015 update 3 #263

d3x0r opened this issue Nov 10, 2016 · 3 comments

Comments

@d3x0r
Copy link

d3x0r commented Nov 10, 2016

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  bufferutil.cc
  win_delay_load_hook.c
C:\Users\<User>\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers [M:\javascript\server\node_modules\websocket\build\bufferutil.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNotifyHook2'
  validation.cc
  win_delay_load_hook.c
C:\Users\<User>\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers [M:\javascript\server\node_modules\websocket\build\validation.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNotifyHook2'

workaround - define this.
DELAYIMP_INSECURE_WRITABLE_HOOKS

https://stackoverflow.com/questions/38149603/npm-install-fails-with-error-c2373-with-vs2015-update-3

@iongion
Copy link

iongion commented Dec 1, 2016

This is still occurring, I have the same but for VS14.0:

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  bufferutil.cc
  win_delay_load_hook.c
C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers [W:\Workspace\producer\keedaemon\monitoring\node_modules\websocket\build\bufferutil.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNotifyHook2'
  validation.cc
  win_delay_load_hook.c
C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers [W:\Workspace\producer\keedaemon\monitoring\node_modules\websocket\build\validation.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNotifyHook2'
monitoring@1.0.2 W:\Workspace\producer\keedaemon\monitoring

@d3x0r
Copy link
Author

d3x0r commented Dec 1, 2016

This fixed it for me...
npm -g install npm@next

(from the end of ) nodejs/node-gyp#972

can add this in binding.gyp

  •  'defines' : ['DELAYIMP_INSECURE_WRITABLE_HOOKS'],
    

@d3x0r
Copy link
Author

d3x0r commented Dec 22, 2016

I thought I had closed this when I found the solution... sorry

@d3x0r d3x0r closed this as completed Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants