Ik wil bcrypt installeren op een Windows 10-machine met Visual Studio Community 2015, Python v2.7.3 geïnstalleerd, maar ik krijg de volgende foutmelding.
node-versie v4.2.1
node-gyp v3.0.3
npm install bcrypt
C:\Users\ASMIN\Desktop\M2\app>npm install bcrypt
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
> [email protected] install C:\Users\ASMIN\Desktop\M2\app\node_modules\bcrypt
> node-gyp rebuild
C:\Users\ASMIN\Desktop\M2\app\node_modules\bcrypt>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" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersio
n or PlatformToolset may be set to an invalid version number. [C:\Users\ASMIN\Desktop\M2\app\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\ASMIN\Desktop\M2\app\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
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 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ASMIN\Desktop\M2\app\node_modules\bcrypt
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "bcrypt"
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\ASMIN\Desktop\M2\app\npm-debug.log
Antwoord 1, autoriteit 100%
Ik had hetzelfde probleem met een andere module.
Ik heb het opgelost door:
- Installeer visual studio community 2013
- Voer
npm config set msvs_version 2013 --global
- Voer
npm install bcrypt
uit
uit
Antwoord 2, autoriteit 79%
Gemakkelijk heb ik dit probleem opgelost door simpelweg een C++-project te maken in VS2015.
Kortom, wanneer u ervoor kiest om een c++-project te maken, zal VS2015 u vragen om een bepaald onderdeel te installeren, u laat het gewoon installeren. Het probleem wordt opgelost. (BTW, ik gebruik VS2015 op Win10)
Antwoord 3, autoriteit 12%
Ik had een probleem met het installeren van karma (npm-module). Ik heb Visual c++ geïnstalleerd van visual studio 2015 install en het werkte.
Antwoord 4, autoriteit 8%
Ik had een soortgelijk probleem tijdens het bouwen van een typische hello_world.c-console-applicatie. De reden was dat ik besloot om VS2015 te installeren op “C: \ Program Files (X86) \ MSVC14”, maar het installatieprogramma geïnstalleerd cl.exe naar de standaard “C: \ programmabestanden (x86) \ Microsoft Visual Studio 14.0” pad. Wat duidelijk een ernstige bug in het setup-programma is.
Ik fuseerde alle inhoud van “Microsoft Visual Studio 14.0” in de map “MSVC14”, en nu werkt alles goed.