cannot install npm package

C:\Users\Gain Solution\Documents\uninite>npm i

bcrypt@0.8.7 install C:\Users\Gain Solution\Documents\uninite\node_modules\bcrypt
node-gyp rebuild

C:\Users\Gain Solution\Documents\uninite\node_modules\bcrypt>if not defined npm_config_node_gyp (node “C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-b
in\…\node_modules\node-gyp\bin\node-gyp.js” rebuild ) else (node “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the “/m” switch.
blowfish.cc
bcrypt.cc
bcrypt_node.cc
win_delay_load_hook.cc
c:\users\gain solution\documents\uninite\node_modules\nan\nan_maybe_43_inl.h(88): error C2039: ‘ForceSet’: is not a member of ‘v8::Object’ (compiling source file …\src\bcrypt_node
.cc) [C:\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(3496): note: see declaration of ‘v8::Object’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan_converters_43_inl.h(18): warning C4996: ‘v8::Value::ToBoolean’: was declared deprecated (compiling source file …\src
bcrypt_node.cc) [C:\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(2663): note: see declaration of ‘v8::Value::ToBoolean’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan_converters_43_inl.h(34): warning C4996: ‘v8::Value::BooleanValue’: was declared deprecated (compiling source file …\s
rc\bcrypt_node.cc) [C:\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(2701): note: see declaration of ‘v8::Value::BooleanValue’ (compiling source file …\src\bcrypt_node.
cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan_implementation_12_inl.h(107): error C2664: ‘v8::MaybeLocalv8::Function v8::Function::New(v8::Localv8::Context,v8::
FunctionCallback,v8::Localv8::Value,int,v8::ConstructorBehavior,v8::SideEffectType)’: cannot convert argument 1 from ‘v8::Isolate *’ to ‘v8::Localv8::Context’ (compiling source
file …\src\bcrypt_node.cc) [C:\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\nan\nan_implementation_12_inl.h(109): note: No constructor could take the source type, or constructor overload resolution wa
s ambiguous (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan_implementation_12_inl.h(345): error C2660: ‘v8::StringObject::New’: function does not take 1 arguments (compiling sour
ce file …\src\bcrypt_node.cc) [C:\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(5531): note: see declaration of ‘v8::StringObject::New’ (compiling source file …\src\bcrypt_node.cc
)
c:\users\gain solution\documents\uninite\node_modules\nan\nan_implementation_12_inl.h(345): error C2059: syntax error: ‘)’ (compiling source file …\src\bcrypt_node.cc) [C:\Users\G
ain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(816): warning C4996: ‘node::MakeCallback’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:
\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\node.h(173): note: see declaration of ‘node::MakeCallback’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(830): warning C4996: ‘node::MakeCallback’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:
\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\node.h(166): note: see declaration of ‘node::MakeCallback’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(844): warning C4996: ‘node::MakeCallback’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:
\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\node.h(159): note: see declaration of ‘node::MakeCallback’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(890): error C2661: ‘v8::Value::ToString’: no overloaded function takes 0 arguments (compiling source file …\src\bcr
ypt_node.cc) [C:\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(900): error C2664: ‘int v8::String::WriteUtf8(v8::Isolate *,char *,int,int *,int) const’: cannot convert argument 1
from ‘char *’ to ‘v8::Isolate *’ (compiling source file …\src\bcrypt_node.cc) [C:\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(900): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style c
ast (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1371): warning C4996: ‘v8::Object::Get’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(3557): note: see declaration of ‘v8::Object::Get’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1372): warning C4996: ‘v8::Object::Get’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(3557): note: see declaration of ‘v8::Object::Get’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1403): warning C4996: ‘v8::Object::Get’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(3557): note: see declaration of ‘v8::Object::Get’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1409): warning C4996: ‘v8::Object::Get’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(3557): note: see declaration of ‘v8::Object::Get’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1446): warning C4996: ‘v8::Object::Get’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(3557): note: see declaration of ‘v8::Object::Get’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1457): warning C4996: ‘node::MakeCallback’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C
:\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\node.h(173): note: see declaration of ‘node::MakeCallback’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1518): warning C4996: ‘v8::Object::Set’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(3498): note: see declaration of ‘v8::Object::Set’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1524): warning C4996: ‘v8::Object::Set’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(3498): note: see declaration of ‘v8::Object::Set’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1530): warning C4996: ‘v8::Object::Set’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(3507): note: see declaration of ‘v8::Object::Set’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1536): warning C4996: ‘v8::Object::Get’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(3553): note: see declaration of ‘v8::Object::Get’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1542): warning C4996: ‘v8::Object::Get’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(3553): note: see declaration of ‘v8::Object::Get’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1547): warning C4996: ‘v8::Object::Get’: was declared deprecated (compiling source file …\src\bcrypt_node.cc) [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(3557): note: see declaration of ‘v8::Object::Get’ (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan_object_wrap.h(24): error C2039: ‘IsNearDeath’: is not a member of ‘Nan::Persistent<v8::Object,v8::NonCopyablePersisten
tTraits>’ [C:\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
with
[
T=v8::Object
] (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1436): note: see declaration of ‘Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits>’
with
[
T=v8::Object
] (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan_object_wrap.h(67): warning C4996: ‘v8::PersistentBasev8::Object::MarkIndependent’: was declared deprecated (compilin
g source file …\src\bcrypt_node.cc) [C:\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\appdata\local\node-gyp\cache\12.16.1\include\node\v8.h(566): note: see declaration of ‘v8::PersistentBasev8::Object::MarkIndependent’ (compiling source f
ile …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan_object_wrap.h(124): error C2039: ‘IsNearDeath’: is not a member of ‘Nan::Persistent<v8::Object,v8::NonCopyablePersiste
ntTraits>’ [C:\Users\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
with
[
T=v8::Object
] (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\nan\nan.h(1436): note: see declaration of ‘Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits>’
with
[
T=v8::Object
] (compiling source file …\src\bcrypt_node.cc)
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(191): error C2661: ‘v8::Value::ToString’: no overloaded function takes 0 arguments [C:\Users\Gain So
lution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(191): error C2512: ‘Nan::Utf8String::Utf8String’: no appropriate default constructor available [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(192): error C2661: ‘v8::Value::ToString’: no overloaded function takes 0 arguments [C:\Users\Gain So
lution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(192): error C2512: ‘Nan::Utf8String::Utf8String’: no appropriate default constructor available [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(210): error C2661: ‘v8::Value::ToString’: no overloaded function takes 0 arguments [C:\Users\Gain So
lution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(210): error C2512: ‘Nan::Utf8String::Utf8String’: no appropriate default constructor available [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(211): error C2661: ‘v8::Value::ToString’: no overloaded function takes 0 arguments [C:\Users\Gain So
lution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(211): error C2512: ‘Nan::Utf8String::Utf8String’: no appropriate default constructor available [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(290): error C2661: ‘v8::Value::ToString’: no overloaded function takes 0 arguments [C:\Users\Gain So
lution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(290): error C2512: ‘Nan::Utf8String::Utf8String’: no appropriate default constructor available [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(291): error C2661: ‘v8::Value::ToString’: no overloaded function takes 0 arguments [C:\Users\Gain So
lution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(291): error C2512: ‘Nan::Utf8String::Utf8String’: no appropriate default constructor available [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(309): error C2661: ‘v8::Value::ToString’: no overloaded function takes 0 arguments [C:\Users\Gain So
lution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(309): error C2512: ‘Nan::Utf8String::Utf8String’: no appropriate default constructor available [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(310): error C2661: ‘v8::Value::ToString’: no overloaded function takes 0 arguments [C:\Users\Gain So
lution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(310): error C2512: ‘Nan::Utf8String::Utf8String’: no appropriate default constructor available [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(330): error C2661: ‘v8::Value::ToString’: no overloaded function takes 0 arguments [C:\Users\Gain So
lution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\gain solution\documents\uninite\node_modules\bcrypt\src\bcrypt_node.cc(330): error C2512: ‘Nan::Utf8String::Utf8String’: no appropriate default constructor available [C:\U
sers\Gain Solution\Documents\uninite\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18363
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\Gain Solution\Documents\uninite\node_modules\bcrypt
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
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.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Gain Solution\AppData\Roaming\npm-cache_logs\2020-03-22T06_23_29_793Z-debug.log

C:\Users\Gain Solution\Documents\uninite>

I think this is an issue where your bcrypt version is not compatible with the node version v12.16.1. When node tries to use it in compiling it fails. Your error says Failed at the bcrypt@0.8.7 install script. so version bcrypt version 0.8.7 is likely the culprit.

Use npm list | grep bcrypt to see which package is using an outdated version of bcrypt or maybe just updating bcrypt will help resolve it.

1 Like

Looking at the bcrypt compatability table: https://github.com/kelektiv/node.bcrypt.js#version-compatibility
You can see that bcrypt 0.8 works for Node 0.11 through v4
The latest Meteor uses Node v12, which needs bcrypt@3.0.6 or above

1 Like