node-gyp: error C2373: '__pfnDliNotifyHook2': redefinition;
- ERR
win_delay_load_hook.c
C:\Users\zetsin\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373:
'__pfnDliNotifyHook2': redefinition; different type modifiers [D:\GitHub\node-winode\node_modules\ref\build\binding.vcx
proj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNot
ifyHook2'
- WHILE
npm install ref
- ENV
Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
>node -v
v4.4.7
>npm -v
3.10.2
>node-gyp -v
v3.4.0
>python -V
Python 2.7.12
>msbuild /ver
14.0.25420.1
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 29 (11 by maintainers)
Commits related to this issue
- install npm3 for every platform fix issue https://github.com/nodejs/node-gyp/issues/972 — committed to pierreinglebert/node-zopfli by pierreinglebert 8 years ago
- install npm3 for every platform fix issue https://github.com/nodejs/node-gyp/issues/972 — committed to pierreinglebert/node-zopfli by pierreinglebert 8 years ago
- Added another issue fix This fixed it for me reference: https://github.com/nodejs/node-gyp/issues/972 — committed to bertyhell/nodejs-guidelines by bertyhell 8 years ago
- attempt to workaround nodejs/node-gyp#972 — committed to naturalatlas/node-gdal by deleted user 8 years ago
- Use npm3 https://github.com/nodejs/node-gyp/issues/972 — committed to lgeiger/zeromq.node by lgeiger 8 years ago
- Use npm3 https://github.com/nodejs/node-gyp/issues/972 — committed to lgeiger/zeromq.node by lgeiger 8 years ago
- No need to use unstable npm any more See https://github.com/nodejs/node-gyp/issues/972#issuecomment-231939559 — committed to desktop/desktop by niik 8 years ago
- Use npm3 https://github.com/nodejs/node-gyp/issues/972 — committed to lgeiger/zeromq.node by lgeiger 8 years ago
- Fix installation failures for versions 0.10.48, 0.12.18 and 5.12.0. npm install for these versions is failing due to a bug that causes installation of native modules to fail with the error: C:\Progra... — committed to tvrprasad/tedious by tvrprasad 7 years ago
- use latest npm on windows, https://github.com/nodejs/node-gyp/issues/972 — committed to dat-ecosystem-archive/rabin by juliangruber 7 years ago
- Fix https://github.com/nodejs/node-gyp/issues/972#issuecomment-229935374 [publish binary] — committed to tptee/node-webworker-threads by tptee 7 years ago
- alt workaround for https://github.com/nodejs/node-gyp/issues/972 since npm-windows-upgrade broke node v0.10.x support — committed to TryGhost/node-sqlite3 by deleted user 7 years ago
- fixes nodejs/node-gyp#972 — committed to vunb/node-fasttext by vunb 6 years ago
- Add instructions for installation issues with node-keytar on windows — committed to desktop/desktop by donokuda 8 years ago
npm -g install npm@next
?npm -g install npm@latest
should do the trick now that it’s been pushed out in a stable release, no need to jump forward tonext
which can sometimes contain regressions.I found a workaround, go to
AppData\Roaming\npm\node_modules\npm
and typenpm remove node-gyp
thennpm install node-gyp
.I think this is due to using npm-windows-upgrade. It guides to use
--production
flag so I guess it installs npm with--production
too. Sonode-gyp
was missingsrc/
.First I had a problem that the upgrade was installing
npm@3.10.3
and it had the previousnode-gyp
. I posted a comment about it. So I hadnode-gyp@3.4.0
in my globalnode_modules
but3.3.1
insidenpm
.Anyway, now I’m finally able to build. 😃
yep, you need 2.15.9: https://github.com/npm/npm/releases/tag/v2.15.9 I think
npm i npm@2 -g
should be enough to upgrade you, we don’t carry it in our Node LTS releases yet but it’ll get there.Had the same issue,
npm -g install npm@next
fixed it for me, if anyone else is in the same boat.Same here. I tried to install the oracledb module and got the same
redefinition; different type modifiers
for__pfnDliNotifyHook2
error. Doing anpm -g install npm@next
did fix this issue.npm -g install npm@next appears to be the magic sauce. Thanks for posting that!
fwiw
npm@next
is probably not going to fix this, yet, there was a problem in the upgrade that went out with 3.10.4, see https://github.com/npm/npm/issues/13256 (my fault somehow I believe). It’s been fixed in tree and I imagine it’ll be out soon in a 3.10.5.npm@2
works fine though if you’re able to use v2.if you are working on an old version like I was, a simple
npm install -g npm
(without the@next
) worked.I had a lot of trouble getting this working for Oracle drive…same error with node-gyp. These are the prerequisites. I think this will also work for other versions of Visual Studio but I used the lastest Community edition 2015.
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