Node.bcrypt.js: Error to execute `npm install bcrypt` with NodeJS 4.0.0 in Windows 10

Created on 13 Sep 2015  路  4Comments  路  Source: kelektiv/node.bcrypt.js

When I install bcrypt from the Windows terminal I can get this error:

c:\xampp\htdocs\project\node_modules\bcrypt\build\bcrypt_lib.vcxproj(19,3): error MSB4019: No se encuentra el proyecto importado "c:\Microsoft.Cpp.Default.props". Aseg煤rese de que la ruta de acceso de la declaraci贸n <Import> es correcta y de que el archivo se encuentra en el disco.

gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\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:\xampp\htdocs\projects\daatr-api\node_modules\bcrypt
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v3.0.1
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.0.0
npm ERR! npm  v2.14.2
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.

Any solution to solve this problem?

Thanks!

Most helpful comment

I solved this error just writing in the terminal the next commando: $ npm config set msvs_version 2015 --global, where msvs_version is the Visual Studio version that you computer is using.

Before to execute this command, be sure to delete the node_modules folder from the project.

PS: If you continue getting errors, try to replace bcrypt to bcryptjs in your package.json. For that, write in the terminal $ npm uninstall bcrypt --save and then $ npm install bcryptjs --save, delete node_modules folder and execute the command in the terminal.

All 4 comments

Please search for other issues related to node v4 installs.

I solved this error just writing in the terminal the next commando: $ npm config set msvs_version 2015 --global, where msvs_version is the Visual Studio version that you computer is using.

Before to execute this command, be sure to delete the node_modules folder from the project.

PS: If you continue getting errors, try to replace bcrypt to bcryptjs in your package.json. For that, write in the terminal $ npm uninstall bcrypt --save and then $ npm install bcryptjs --save, delete node_modules folder and execute the command in the terminal.

I gave up, just install bcrypt-nodejs :)

@jferrettiboke Thanks for this

**

I solved this error just writing in the terminal the next commando: $ npm config set msvs_version 2015 --global, where msvs_version is the Visual Studio version that you computer is using.

**

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Z3roCoder picture Z3roCoder  路  5Comments

alanosman picture alanosman  路  3Comments

summertong picture summertong  路  5Comments

enneid picture enneid  路  5Comments

thorlacius picture thorlacius  路  4Comments