Tell npm to ignore bcrypt

Like all the Windows users, I have the bcrypt message

eNote: you are using a pure-JavaScript implementation of bcrypt.e[39m
While this implementation will work correctly, it is known to bee[39m
approximately three times slower than the native implementation.e[39m
In order to use the native implementation instead, rune

  meteor npm install --save bcrypte

in the root directory of your application.e

When you type meteor npm install npm tries to compilation with node-gyp and an MSVC compiler suite, that I don’t have. So it fails and the script exists with an error.

The result is all other npm packages in packages.json are not installed and I need to install them one by one.

How do I instruct npm to either ignore bcrypt or continue despite the failure installing other packages ? I couldn’t find a suitable option in npm.

You can’t avoid it, It’s part of the Meteor’s build toolchain.

Just install the needed dependencies

If I remember well :
Python 2.7
Microsoft Dev tools for window user
gcc if you’re on linux.

You’ll find the official answer to this question by googling about the Meteor 1.4 migration process I my memory’s good

Installing such a toolchain on a server requires IT permission.
It’s not like meteor that you can just hide in a local folder.

Hm I see.

Well, if you don’t have the rights and can’t get them, the dirty workaround would be to downgrade your meteor version prior to 1.4, which brought the toolchain modifications.

For that, modify the yourProject/.meteor/release file with 1.3.4 (I think it was the last stable version before the release of 1.4, but I’m going to check and come back tell you)

PS : nope, the last version before 1.4 was
Source :

I don’t want to seem ungreatful to your help but that’s worse than doing a separate .bat script to install the npm packages one by one instead of meteor npm install

Don’t worry.

Hm, WOuld that work ? i’m not sure. I seems to me that Meteor uses its own NPM version and packages. Would installing a package with classic NPM make it available for meteor too, and vice versa ?

There might be a little bit of confusion : meteor works, it complains about bcrypt using a pure-javascript implementation and if you ask npm to install the package it blows up. But the tool works perfectly otherwise.

The problem is meteor npm install does try to install bcrypt and quite at the beginning. If it had the great idea of leaving it to the end I wouldn’t care it failed and stopped on error.

What I manually do currently is install the packages one by one

meteor npm install package_one
meteor npm install package-two

That can be semi-automated.

That said, I heard in this forum you shouldn’t use an npm that is installed separately from meteor to install packages or you could get into trouble. But I never installed npm separatedly, so I don’t have that issue to worry about.

1 Like

Make sure you install the older version of bcrypt.

$ meteor npm install --save bcrypt@0.8.7

Version 1.x does not play well with Meteor.

I improved things by putting bcrypt at the end of the package.json file. So it still fails but properly installs all other packages

  "dependencies": {
    "autoprefixer": "^6.5.3",
    "babel-runtime": "^6.18.0",
    "d3": "^4.4.0",
    "meteor-node-stubs": "^0.2.4",
    "moment": "^2.17.0",
    "bcrypt": "^0.8.7"