How to fix the bcrypt error in windows 7?

ehm, how do I know where python is installed? :slight_smile:

import sys
sys.executable

If you’re upgrading to the latest version of Python for Windows 2.7.12, there is an option to add it automatically to the path.

windows-build-tools has been installing for about 8 hours:

Starting installation…
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!
Waiting for installers… -Successfully installed Python 2.7
Waiting for installers… -

Same problem for me, I tried more and more time

This worked for me:

Disable anti-virus software (Avast was giving false positives)
Install latest version of Python for Windows 2.7.12 (from https://www.python.org/downloads/)
Upgrade NodeJS to latest version 4.5 (from https://nodejs.org/en/download/)

Launch PowerShell as administrator

npm install -g node-gyp
npm install --global --production windows-build-tools
npm install -g node-pre-gyp
npm install -g chokidar

From root of your app folder:

meteor npm install --save bcrypt

I did receive the following warning:

…\src\bcrypt.cc(232): warning C4267: ‘=’: conversion from ‘size_t’ to ‘unsigned char’, possible loss of data

but it looks like it’s working now.

4 Likes

but " npm install --global --production windows-build-tools " already install the python 2.7 in my system …do i need to install it again from external source ??

You can probably skip the Python step. Those are just the steps I used.

I tired but get error

npm ERR! node v4.5.0                                                          
npm ERR! npm  v3.10.6                                                         
npm ERR! code ELIFECYCLE                                                      
                                                                              
npm ERR! bcrypt@0.8.7 install: `node-gyp rebuild`                             
npm ERR! Exit status 1                                                        
npm ERR!                                                                      
npm ERR! Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'.        
npm ERR! Make sure you have the latest version of node.js and npm installed.  
npm ERR! If you do, 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 information on how to open an issue for this project with
:                                                                             
npm ERR!     npm bugs bcrypt                                                  
npm ERR! Or if that isn't available, 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!     D:\meteor-app\pos\npm-debug.log                                  

Please help me.

Did you run all the commands one by one?

Thanks for your reply, waiting for a long time with

npm install --global --production windows-build-tools
1 Like

That’s what node-gyp requires, without that one installed, node-gyp doesn’t work.

I had the same problem. Left it overnight and it was still waiting. I fixed it by manually downloading and installing the latest version of NodeJS for Windows. Probably not necessary but I also installed the latest version of Python.

I tried to ignore npm install --global --production windows-build-tools, and install it by manual NodeJS, Windows BT and Python.
And then install `meteor npm install --save bcrypt``in my project, but still have the same problem like above.

Read this file for more information:

1 Like

I solved this by following ‘rdagger’ steps, but with a slight variation.

I have used windows powershell with admin previlege
At the step meteor ‘npm install --global --production windows-build-tool’, after Python installed, I have waited a long without any status, so quit the power shell and browsed to ‘C:\Users\#user#\.windows-build-tools’, where I found ‘BuildTools_Full.exe’. I have ran it manually with default options. It also took a bit time, but atleast I can see the status.
It installed some C++ tools etc. After this, I resumed the ‘powershell’ and continued steps from ‘npm install -g node-pre-gyp’. Have ignored all the warnings! Then started meteor in my project folder. Voila!

3 Likes

Thanks a lot, it solved the issue

Tried all of your solutions but none of them worked:

C:\Users\Casa\Desktop\recipic> meteor npm install --save bcrypt
npm ERR! git clone --template=C:\Users\Casa\AppData\Local\.meteor\packages\meteor-tool\1.5.1-rc.1\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mirror git://github.com/nmccready/google-maps-utility-library-v3-mar
kerwithlabel.git C:\Users\Casa\AppData\Local\.meteor\packages\meteor-tool\1.5.1-rc.1\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-nmccready-google-maps-utility-library-v3-markerwithlabel-git-535ad55b: Cloning
into bare repository 'C:\Users\Casa\AppData\Local\.meteor\packages\meteor-tool\1.5.1-rc.1\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-nmccready-google-maps-utility-library-v3-markerwithlabel-git-535ad55b'...
npm ERR! git clone --template=C:\Users\Casa\AppData\Local\.meteor\packages\meteor-tool\1.5.1-rc.1\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mirror git://github.com/nmccready/google-maps-utility-library-v3-mar
kerwithlabel.git C:\Users\Casa\AppData\Local\.meteor\packages\meteor-tool\1.5.1-rc.1\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-nmccready-google-maps-utility-library-v3-markerwithlabel-git-535ad55b: fatal: b
ad object 1e1ae841596ce41fb5cfaff301477393c5621d3d
npm ERR! git clone --template=C:\Users\Casa\AppData\Local\.meteor\packages\meteor-tool\1.5.1-rc.1\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mirror git://github.com/nmccready/google-maps-utility-library-v3-mar
kerwithlabel.git C:\Users\Casa\AppData\Local\.meteor\packages\meteor-tool\1.5.1-rc.1\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-nmccready-google-maps-utility-library-v3-markerwithlabel-git-535ad55b: fatal: r
emote did not send all necessary objects
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\Casa\AppData\Local\.meteor\packages\meteor-tool\1.5.1-rc.1\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mirror git://github.com/nmccr
eady/google-maps-utility-library-v3-markerwithlabel.git C:\Users\Casa\AppData\Local\.meteor\packages\meteor-tool\1.5.1-rc.1\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-nmccready-google-maps-utility-library-v3
-markerwithlabel-git-535ad55b
npm ERR! Cloning into bare repository 'C:\Users\Casa\AppData\Local\.meteor\packages\meteor-tool\1.5.1-rc.1\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-nmccready-google-maps-utility-library-v3-markerwithlabel-
git-535ad55b'...
npm ERR! fatal: bad object 1e1ae841596ce41fb5cfaff301477393c5621d3d
npm ERR! fatal: remote did not send all necessary objects
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Casa\AppData\Local\.meteor\packages\meteor-tool\1.5.1-rc.1\mt-os.windows.x86_32\dev_bundle\.npm\_logs\2017-07-09T14_28_22_351Z-debug.log

It’s probably worth mentioning that you can totally ignore this notice and continue without any problems.
It’s just a harmless notice that the js implementation is slower than a natively built one

Thank you, it solved the issue.

Thanks! It works for me. I’m using Windows 10 64-bit.