Last active
July 18, 2016 16:21
-
-
Save anhnt/a84ddac2358f8b30e8c7d5defb95c0bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STEP 1 | |
Perform full installation of C++ Build Tools 2015 (from: https://blogs.msdn.microsoft.com/vcblog/2016/03/31/announcing-the-official-release-of-the-visual-c-build-tools-2015/) | |
(I say full install because this is what I did, however I don't claim that the full install is necessary) | |
Note: this may take a while as the full program is over 4GB | |
STEP 2 | |
Install Python 2.7.11 (from: https://www.python.org/) | |
Note: during installation select the "add to PATH" option (which is not selected by default) | |
STEP 3 | |
Run: | |
npm config set msvs_version 2015 --global | |
Note: I ran it as administrator in Windows cmd.exe | |
STEP 4 | |
In my NodeJS project folder (a little blog app i am writing to learn NodeJS), I then ran the install command: | |
npm install bcrypt --save | |
C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers [C:\Project | |
s\shipperApp\node_modules\bcrypt\build\bcrypt_lib.vcxproj] | |
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNotifyHook2' | |
This error stays in relation with npm, node-gyp and Visual Studio 2015 and is already fixed in [email protected], but npm is still pointing to an old version. As I workaround I can propose this: | |
Go to your folder where npm is installed, e.g.: C:\Program Files\nodejs\node_modules\npm | |
Open: package.json | |
Remove entry for node-gyp in bundleDependencies | |
Bump version number to 3.4.0 for node-gyp in dependencies | |
Make a npm i in this directory to install [email protected] to fix the problem | |
Relating GitHub issues can be found here: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment