Advanced Bitcoin Scripting - Discussion

Hello Filip,

Started Lightning Network & Lightning App Programming which indicated:

Prerequisites:

  • Blockchain & Bitcoin 101
  • Smart Contract Programming

Which course is “Smart Contract Programming”?

Thanks

Hello Sir, yes that is a misspell we actually made, sorry for that and thank you for notice it.

I suggest to take this course to have a better understanding before jumping into the Lightning Network course: Javascript Programming for Blockchain Developers.

Thank you.
Carlos Z.

Hi Carlos, many thanks for your step-by-step post.

I also hit similar problems on install as @Blockchain4MiAm and was floundering this morning until I found your post. Following these steps (including step 7 - ‘welcome to hell’) was a success and I’m now ready to go with bcoin installed.

Great support, it’s much appreciated.
Mark

1 Like

Hi @filip / @thecil,

After successfully installing bcoin (following steps outlined by Carlos in this post). I’m now getting an error (“Error: Could not locate the bindings file.” ) when I run the address.js (from part 2 - Creating Keys) - see below. Please can you give me any pointers as to what I’m doing wrong?

My code in the address.js file is as follows:

‘use strict’

const fs = require(‘fs’);
const bcoin = require(‘bcoin’);
const KeyRing = bcoin.wallet.WalletKey;
const Script = bcoin.Script;

// Create 2 private keys
const keypair1 = KeyRing.generate(true, ‘regtest’);
const keypair2 = KeyRing.generate(true, ‘regtest’);

// Export key pairs
fs.writeFileSync(‘regtest-key1.wif’, keypair1.toSecret(‘regtest’));
fs.writeFileSync(‘regtest-key2.wif’, keypair2.toSecret(‘regtest’));

Then from my Windows PowerShell:

PS C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject> ls

Directory: C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject

Mode LastWriteTime Length Name


d----- 07/05/2020 11:19 node_modules
-a---- 07/05/2020 13:39 442 address.js
-a---- 07/05/2020 11:19 39701 package-lock.json
-a---- 07/05/2020 11:19 306 package.json

PS C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject> node address.js
C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\bindings\bindings.js:99
throw err
^

Error: Could not locate the bindings file. Tried:
→ C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\build\leveldown.node
→ C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\build\Debug\leveldown.node
→ C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\build\Release\leveldown.node
→ C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\out\Debug\leveldown.node
→ C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\Debug\leveldown.node
→ C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\out\Release\leveldown.node
→ C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\Release\leveldown.node
→ C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\build\default\leveldown.node
→ C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\compiled\12.16.3\win32\x64\leveldown.node
at bindings (C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\e[4mbindingse[24m\bindings.js:96:9)
at Object. (C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\e[4mleveldowne[24m\leveldown.js:3:36)
e[90m at Module._compile (internal/modules/cjs/loader.js:1133:30)e[39m
e[90m at Object.Module._extensions…js (internal/modules/cjs/loader.js:1153:10)e[39m
e[90m at Module.load (internal/modules/cjs/loader.js:977:32)e[39m
e[90m at Function.Module._load (internal/modules/cjs/loader.js:877:14)e[39m
e[90m at Module.require (internal/modules/cjs/loader.js:1019:19)e[39m
e[90m at require (internal/modules/cjs/helpers.js:77:18)e[39m
at Object. (C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\e[4mbdbe[24m\lib\level.js:9:18)
e[90m at Module._compile (internal/modules/cjs/loader.js:1133:30)e[39m {
tries: [
e[32m’C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\build\leveldown.node’e[39m,
e[32m’C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\build\Debug\leveldown.node’e[39m,
e[32m’C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\build\Release\leveldown.node’e[39m,
e[32m’C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\out\Debug\leveldown.node’e[39m,
e[32m’C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\Debug\leveldown.node’e[39m,
e[32m’C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\out\Release\leveldown.node’e[39m,
e[32m’C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\Release\leveldown.node’e[39m,
e[32m’C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\build\default\leveldown.node’e[39m,
e[32m’C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\compiled\12.16.3\win32\x64\leveldown.node’e[39m
]
}
PS C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject>

samezies!!! any help would be wonderful.
ML

Hello sir, there might be a issue with one of the modules files on your system, try run this command inside your multisig project (REMEMBER: run the powershell as administrator)

npm rebuild

If you have any doubt, please let us know so we can help you! :slight_smile:

Carlos Z.

Hi Carlos,

Thanks for the quick response. Yep, I’m issuing all commands within Administrator Windows Powershell (Windows 10). Unfortunately running npm rebuild gives the following errors (see below) - any suggestion as to what to try next?

PS C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject> npm rebuild

[email protected] install C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\bcrypto
node-gyp rebuild || echo ‘Build failed.’

C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\bcrypto>if not defined npm_config_node_gyp (node “C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\…\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 )
Python was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink?linkID=2082640gyp: Call to ‘python -c ‘from future import print_function; import sys; print(sys.byteorder)’’ returned exit status 9009 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:310:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18362
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\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\bcrypto
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
‘Build failed.’

[email protected] install C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1
npm run rebuild || echo “Secp256k1 bindings compilation fail. Pure JS implementation will be used.”

[email protected] rebuild C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1
node-gyp rebuild

C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1>if not defined npm_config_node_gyp (node “C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\…\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.
addon.cc
privatekey.cc
publickey.cc
signature.cc
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_converters_43_inl.h(22): warning C4996: ‘v8::Value::ToBoolean’: was declared de
precated (compiling source file …\src\publickey.cc)c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_converters_43_inl.h(22): wa
rning C4996: ‘v8::Value::ToBoolean’: was declared deprecated (compiling source file …\src\privatekey.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigp
roject\node_modules\secp256k1\build\secp256k1.vcxproj]

c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_converters_43_inl.h(22): warning C4996: ‘v8::Value::ToBoolean’: was declared de
precated (compiling source file …\src\addon.cc)c:\users\marks\appdata\local\node-gyp\cache\12.16.3\include\node\v8.h(2663): note: see declaration of ‘v8::Value::ToBoolean’ (compiling
source file …\src\privatekey.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
c:\users\marks\appdata\local\node-gyp\cache\12.16.3\include\node\v8.h(2663): note: see declaration of ‘v8::Value::ToBoolean’ (compiling source file …\src\publickey.cc)

c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_converters_43_inl.h(40): warning C4996: ‘v8::Value::BooleanValue’: was declared
deprecated (compiling source file …\src\privatekey.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1\build\secp256k1.vcx
proj]
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_converters_43_inl.h(40): warning C4996: ‘v8::Value::BooleanValue’: was declared
deprecated (compiling source file …\src\publickey.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxp
roj]
c:\users\marks\appdata\local\node-gyp\cache\12.16.3\include\node\v8.h(2701): note: see declaration of ‘v8::Value::BooleanValue’ (compiling source file …\src\privatekey.cc)
c:\users\marks\appdata\local\node-gyp\cache\12.16.3\include\node\v8.h(2701): note: see declaration of ‘v8::Value::BooleanValue’ (compiling source file …\src\publickey.cc)
c:\users\marks\appdata\local\node-gyp\cache\12.16.3\include\node\v8.h(2663): note: see declaration of ‘v8::Value::ToBoolean’ (compiling source file …\src\addon.cc)c:\users\marks\doc
uments\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_converters_43_inl.h(22): warning C4996: ‘v8::Value::ToBoolean’: was declared deprecated (compil
ing source file …\src\signature.cc)

c:\users\marks\appdata\local\node-gyp\cache\12.16.3\include\node\v8.h(2663): note: see declaration of ‘v8::Value::ToBoolean’ (compiling source file …\src\signature.cc)
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_converters_43_inl.h(40): warning C4996: ‘v8::Value::BooleanValue’: was declared
deprecated (compiling source file …\src\signature.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxp
roj]
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_converters_43_inl.h(40): warning C4996: ‘v8::Value::BooleanValue’: was declared
deprecated (compiling source file …\src\addon.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
c:\users\marks\appdata\local\node-gyp\cache\12.16.3\include\node\v8.h(2701): note: see declaration of ‘v8::Value::BooleanValue’ (compiling source file …\src\signature.cc)
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(103): error C2664: ‘v8::MaybeLocalv8::Function v8::Fu
nction::New(v8::Localv8::Context,v8::FunctionCallback,v8::Localv8::Value,int,v8::ConstructorBehavior,v8::SideEffectType)’: cannot convert argument 1 from ‘v8::Isolate *’ to ‘v8::Lo
calv8::Context’ (compiling source file …\src\publickey.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1\build\secp256k
1.vcxproj]
c:\users\marks\appdata\local\node-gyp\cache\12.16.3\include\node\v8.h(2701): note: see declaration of ‘v8::Value::BooleanValue’ (compiling source file …\src\addon.cc)
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(105): note: No constructor could take the source type
, or constructor overload resolution was ambiguous (compiling source file …\src\publickey.cc)
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(103): error C2664: ‘v8::MaybeLocalv8::Function v8::Fu
nction::New(v8::Localv8::Context,v8::FunctionCallback,v8::Localv8::Value,int,v8::ConstructorBehavior,v8::SideEffectType)’: cannot convert argument 1 from ‘v8::Isolate *’ to ‘v8::Lo
calv8::Context’ (compiling source file …\src\privatekey.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1\build\secp256
k1.vcxproj]
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(105): note: No constructor could take the source type
, or constructor overload resolution was ambiguous (compiling source file …\src\privatekey.cc)
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(337): error C2660: ‘v8::StringObject::New’: function do
es not take 1 arguments (compiling source file …\src\publickey.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1\build\se
cp256k1.vcxproj]
c:\users\marks\appdata\local\node-gyp\cache\12.16.3\include\node\v8.h(5531): note: see declaration of ‘v8::StringObject::New’ (compiling source file …\src\publickey.cc)
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(103): error C2664: ‘v8::MaybeLocalv8::Function v8::Fu
nction::New(v8::Localv8::Context,v8::FunctionCallback,v8::Localv8::Value,int,v8::ConstructorBehavior,v8::SideEffectType)’: cannot convert argument 1 from ‘v8::Isolate *’ to ‘v8::Lo
calv8::Context’ (compiling source file …\src\signature.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1\build\secp256k
1.vcxproj]
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(105): note: No constructor could take the source type
, or constructor overload resolution was ambiguous (compiling source file …\src\signature.cc)
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(103): error C2664: ‘v8::MaybeLocalv8::Function v8::Fu
nction::New(v8::Localv8::Context,v8::FunctionCallback,v8::Localv8::Value,int,v8::ConstructorBehavior,v8::SideEffectType)’: cannot convert argument 1 from ‘v8::Isolate *’ to ‘v8::Lo
calv8::Context’ (compiling source file …\src\addon.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1\build\secp256k1.vc
xproj]
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(337): error C2059: syntax error: ‘)’ (compiling source
file …\src\publickey.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(337): error C2660: ‘v8::StringObject::New’: function do
es not take 1 arguments (compiling source file …\src\privatekey.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\secp256k1\build\s
ecp256k1.vcxproj]

There is lot more but I’ve cut here … however it concludes as follows:

c:\users\marks\appdata\local\node-gyp\cache\12.16.3\include\node\v8.h(2709): note: see declaration of ‘v8::Value::Int32Value’ (compiling source file …\src\iterator.cc)
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\leveldown\src\iterator.cc(595): error C2661: ‘leveldown::Iterator::Iterator’: no overlo
aded function takes 15 arguments [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\build\leveldown.vcxproj]
c:\users\marks\documents\ivanontech academy\bitcoin programming 101\multisigproject\node_modules\leveldown\src\database.h(31): warning C4996: ‘v8::Object::Set’: was declared deprecated
(compiling source file …\src\leveldown_async.cc) [C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown\build\leveldown.vcxproj]
c:\users\marks\appdata\local\node-gyp\cache\12.16.3\include\node\v8.h(3498): note: see declaration of ‘v8::Object::Set’ (compiling source file …\src\leveldown_async.cc)
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:310:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18362
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\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject\node_modules\leveldown
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: prebuild-install || node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\marks\AppData\Roaming\npm-cache_logs\2020-05-07T18_50_16_799Z-debug.log
PS C:\Users\marks\Documents\IvanOnTech Academy\Bitcoin Programming 101\multisigproject>

Some programs are not capable to run correctly if you have spaces on a folder name.
Try to rename your Bitcoin Programming 101 to something like BitcoinProgramming101, and let me know. I will try to catch you quickly in the next reply to help you with that.

Hope you find this useful! :slight_smile:

Carlos Z.

Thanks Carlos for the continued support in trouble-shooting this issue.

I’ve renamed the directories to remove spaces, but I still get binding error when executing ‘node address.js’
I therefore executed an ‘npm rebuild’ but again I get the same errors as before.
See below for error output.

PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101> ls

Directory: C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101

Mode LastWriteTime Length Name

d----- 07/05/2020 11:58 multisigproject
-a---- 24/04/2020 14:07 194 rawtransactionstring
-a---- 14/04/2020 14:43 503892 testdumpwalletfile
-a---- 24/04/2020 14:08 230 Unlocking and Locking strings

PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101> cd multisigproject
PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> node address.js
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\bindings\bindings.js:99
throw err
^

Error: Could not locate the bindings file. Tried:
→ C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\build\leveldown.node

etc, etc …

PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> npm rebuild

[email protected] install C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\bcrypto
node-gyp rebuild || echo ‘Build failed.’

C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\bcrypto>if not defined npm_config_node_gyp (node “C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\…\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 )
Python was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink?linkID=2082640gyp: Call to ‘python -c ‘from future import print_function; import sys; print(sys.byteorder)’’ returned exit status 9009 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:310:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18362
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\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\bcrypto
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
‘Build failed.’

etc, etc …

ok, looks like the python is not properly installed and also there is a problem with one of the modules, you could try to delete all the files and restart from the beginning.

Do you follow the guide that i made days ago? Here.

Also did you install the NodeJS?

You also can try to uninstall the NodeJS and download it again and reinstall it, probably one of the modules is corrupted, antivirus maybe? or did you installed in the wrong directory?

Im pretty sure that the guide i made should fix any error that you get, still a clear reinstall coudl fix the issue. Let me know if after following the guide i made, the problem still appears… this looks like the NodeJS is not properly installed on the system.

Carlos Z.

Hi Carlos,

Unfortunately, I’m still having the same issues. Yes, I previously installed NodeJS and followed your guide - which I thought had worked until I actually tried to run the address.js (node address.js) and hit the same issue (i.e. Error: Could not locate the bindings file).

I updated my windows 10 build (which was slightly out of date). Switched off virus & malware checker. I uninstalled NodeJS, Python (which I noticed had versions for 2.7 and 3.7 installed), and even anything Visual Studio C++ related I could find (some components were labeled 2010, 2013 and later, so I thought that might be an issue). And then deleted all the files and ‘node modules’ folder within my ‘…/multisigproject’ folder (to just leave my address.js file).

From the Microsoft website, I installed Visual Studio 2019 (with just C++ and Python components).

I then repeated the steps that you outlined. I also tried issuing the command: ‘npm config set msvs_version 2019’ as I read that this is applicable after installing Visual Studio (https://github.com/nodejs/node-gyp#on-windows).

One oddity I notice is that I now seem to have two versions of Python installed once more!?: Python 2.7 and Python 3.7

@thecil Do you have any other suggestions as to what I could try?
I appreciate any other assistance you’re able to give.

@Blockchain4MiAm - are you still having the same problem?

@thecil - Following on from my last post. Here is the contents of the PS window:

PS C:\WINDOWS\system32> cd C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject
PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> npm

Usage: npm <command>

where <command> is one of:
    access, adduser, audit, bin, bugs, c, cache, ci, cit,
    clean-install, clean-install-test, completion, config,
    create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
    edit, explore, fund, get, help, help-search, hook, i, init,
    install, install-ci-test, install-test, it, link, list, ln,
    login, logout, ls, org, outdated, owner, pack, ping, prefix,
    profile, prune, publish, rb, rebuild, repo, restart, root,
    run, run-script, s, se, search, set, shrinkwrap, star,
    stars, start, stop, t, team, test, token, tst, un,
    uninstall, unpublish, unstar, up, update, v, version, view,
    whoami

npm <command> -h  quick help on <command>
npm -l            display full usage info
npm help <term>   search for help on <term>
npm help npm      involved overview

Specify configs in the ini-formatted file:
    C:\Users\marks\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

[email protected] C:\Program Files\nodejs\node_modules\npm
PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> npm config set msvs_version 2019
PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help json` for definitive documentation on these fields
and exactly what they do.

Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (multisigproject)
version: (1.0.0)
description:
entry point: (address.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\package.json:

{
  "name": "multisigproject",
  "version": "1.0.0",
  "description": "",
  "main": "address.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}


Is this OK? (yes)
PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> npm install bcoin

> [email protected] install C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr
> node-gyp rebuild


C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\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 )
gyp ERR! find Python
gyp ERR! find Python checking Python explicitly set from command line or npm configuration
gyp ERR! find Python - "--python=" or "npm config get python" is "C:\Users\marks\.windows-build-tools\python27\python.exe"
gyp ERR! find Python - "C:\Users\marks\.windows-build-tools\python27\python.exe" is not in PATH or produced an error
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - "C:\Python27\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Python37\python.exe
gyp ERR! find Python - "C:\Python37\python.exe" could not be run
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python   npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack     at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
gyp ERR! stack     at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
gyp ERR! stack     at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
gyp ERR! stack     at exithandler (child_process.js:310:5)
gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:322:5)
gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
gyp ERR! stack     at onErrorNT (internal/child_process.js:469:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:84:21)
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\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\marks\AppData\Roaming\npm-cache\_logs\2020-05-11T15_11_04_249Z-debug.log
PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> npm install python
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
added 1 package from 1 contributor, removed 124 packages and audited 1 package in 3.378s
found 0 vulnerabilities

PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> npm install bcoin

> [email protected] install C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr
> node-gyp rebuild


C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\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 )
gyp ERR! find Python
gyp ERR! find Python checking Python explicitly set from command line or npm configuration
gyp ERR! find Python - "--python=" or "npm config get python" is "C:\Users\marks\.windows-build-tools\python27\python.exe"
gyp ERR! find Python - "C:\Users\marks\.windows-build-tools\python27\python.exe" is not in PATH or produced an error
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - "C:\Python27\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Python37\python.exe
gyp ERR! find Python - "C:\Python37\python.exe" could not be run
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python   npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack     at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
gyp ERR! stack     at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
gyp ERR! stack     at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
gyp ERR! stack     at exithandler (child_process.js:310:5)
gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:322:5)
gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
gyp ERR! stack     at onErrorNT (internal/child_process.js:469:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:84:21)
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\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\marks\AppData\Roaming\npm-cache\_logs\2020-05-11T15_13_49_772Z-debug.log
PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> npm install --global --production windows-build-tools
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

> [email protected] postinstall C:\Users\marks\AppData\Roaming\npm\node_modules\windows-build-tools
> node ./dist/index.js



Downloading python-2.7.15.amd64.msi
[>                                            ] 0.0% (0 B/s)
Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\marks\.windows-build-tools\python-2.7.15.amd64.msi.
Downloading vs_BuildTools.exe
[>                                            ] 0.0% (0 B/s)
Downloaded vs_BuildTools.exe. Saved to C:\Users\marks\.windows-build-tools\vs_BuildTools.exe.

Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!

Status from the installers:
---------- Visual Studio Build Tools ----------
Successfully installed Visual Studio Build Tools.
------------------- Python --------------------

Now configuring the Visual Studio Build Tools and Python...

All done!

+ [email protected]
updated 1 package in 65.131s
PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> npm install bcoin

> [email protected] install C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr
> node-gyp rebuild


C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\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.
  murmur3.c
  mrmr.c
  win_delay_load_hook.cc
     Creating library C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr\build
  \Release\mrmr.lib and object C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\m
  rmr\build\Release\mrmr.exp
  mrmr.vcxproj -> C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr\build\Rel
  ease\\mrmr.node
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
added 3 packages from 2 contributors and audited 387 packages in 12.82s
found 0 vulnerabilities

PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> node address.js                           C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\bindings\bindings.js:99
  throw err
  ^

Error: Could not locate the bindings file. Tried:
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\build\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\build\Debug\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\build\Release\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\out\Debug\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\Debug\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\out\Release\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\Release\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\build\default\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\compiled\12.16.3\win32\x64\leveldown.node
    at bindings (C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\ [4mbindings [24m\bindings.js:96:9)
    at Object.<anonymous> (C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\ [4mleveldown [24m\leveldown.js:3:36)
 [90m    at Module._compile (internal/modules/cjs/loader.js:1133:30) [39m
 [90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10) [39m
 [90m    at Module.load (internal/modules/cjs/loader.js:977:32) [39m
 [90m    at Function.Module._load (internal/modules/cjs/loader.js:877:14) [39m
 [90m    at Module.require (internal/modules/cjs/loader.js:1019:19) [39m
 [90m    at require (internal/modules/cjs/helpers.js:77:18) [39m
    at Object.<anonymous> (C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\ [4mbdb [24m\lib\level.js:9:18)
 [90m    at Module._compile (internal/modules/cjs/loader.js:1133:30) [39m {
  tries: [
     [32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\build\\leveldown.node' [39m,
     [32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\build\\Debug\\leveldown.node' [39m,
     [32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\build\\Release\\leveldown.node' [39m,
     [32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\out\\Debug\\leveldown.node' [39m,
     [32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\Debug\\leveldown.node' [39m,
     [32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\out\\Release\\leveldown.node' [39m,
     [32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\Release\\leveldown.node' [39m,
     [32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\build\\default\\leveldown.node' [39m,
     [32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\compiled\\12.16.3\\win32\\x64\\leveldown.node' [39m
  ]
}
PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject>

you know I keep getting stuck with this and the Solidity course, when I try to get Truffle going. I am either stopped with a ‘build’ error or not being able to find ‘bindings’. I am now getting stopped on the Defi course trying to run the DSR assignment. I need that silver bullet lol

Ok, try to run the following command to point the python.exe to the npm. But before that, you could try to locate it yourself, by using the windows 10 searchbar “python.exe” to see if it’s installed proprely or not, if you find it, copy tha route folder and paste it with the next command:

npm config set python “C:\Path\To\python.exe”

Be sure that the folder path that you will use, is the right one where the python.exe is installed/located.
Still, i will not assure you that this will fix the problem, there is another weird issue with Windows, its really hard to know whit could be the exact problem.

@Blockchain4MiAm check this one too please.

This issue is really weird, if you have installed python, npm, nodejs and all the dependecies, there probably is a problem with a windows administrative services, antivirus, or corrupted files, its really hard to know, i could suggest you guys to install a Virtual Machine and use linux instead over the course, you will deal with less issues on linux than windows, also the other course that you take will be getting you a lot of issues in windows, so if you really want to do the programming categories of all the course with less issues in the journey, you can check this guide that another student made to install a VM and later linux: VM guide.

If you have any doubt, please let us know so we can help you! :slight_smile:

Carlos Z.

Hi Carlos,

Thanks again for the quick response (this issue is certainly a bit of a marathon :slightly_frowning_face:). I’ve located python.exe and set the path. Unfortunately, I still get the same ‘could not locate bindings file’ error. One thing that seems odd to me is that the date of the python.exe is from last year (15/10/19) - and yet I reinstalled python yesterday!? See the directory listing (ls) at the end of the following output and you’ll see what I mean.

PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> npm config set python "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe"
PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> node address.js
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\bindings\bindings.js:99
  throw err
  ^

Error: Could not locate the bindings file. Tried:
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\build\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\build\Debug\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\build\Release\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\out\Debug\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\Debug\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\out\Release\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\Release\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\build\default\leveldown.node
 → C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\compiled\12.16.3\win32\x64\leveldown.node
    at bindings (C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\e[4mbindingse[24m\bindings.js:96:9)
    at Object.<anonymous> (C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\e[4mleveldowne[24m\leveldown.js:3:36)
e[90m    at Module._compile (internal/modules/cjs/loader.js:1133:30)e[39m
e[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)e[39m
e[90m    at Module.load (internal/modules/cjs/loader.js:977:32)e[39m
e[90m    at Function.Module._load (internal/modules/cjs/loader.js:877:14)e[39m
e[90m    at Module.require (internal/modules/cjs/loader.js:1019:19)e[39m
e[90m    at require (internal/modules/cjs/helpers.js:77:18)e[39m
    at Object.<anonymous> (C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\e[4mbdbe[24m\lib\level.js:9:18)
e[90m    at Module._compile (internal/modules/cjs/loader.js:1133:30)e[39m {
  tries: [
    e[32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\build\\leveldown.node'e[39m,
    e[32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\build\\Debug\\leveldown.node'e[39m,
    e[32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\build\\Release\\leveldown.node'e[39m,
    e[32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\out\\Debug\\leveldown.node'e[39m,
    e[32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\Debug\\leveldown.node'e[39m,
    e[32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\out\\Release\\leveldown.node'e[39m,
    e[32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\Release\\leveldown.node'e[39m,
    e[32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\build\\default\\leveldown.node'e[39m,
    e[32m'C:\\Users\\marks\\Documents\\IvanOnTechAcademy\\BitcoinProg101\\multisigproject\\node_modules\\leveldown\\compiled\\12.16.3\\win32\\x64\\leveldown.node'e[39m
  ]
}


PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> cd "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\"

PS C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64> ls


    Directory: C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       11/05/2020     15:17                DLLs
d-----       11/05/2020     15:17                Doc
d-----       11/05/2020     15:16                include
d-----       11/05/2020     15:17                Lib
d-----       11/05/2020     15:17                libs
d-----       11/05/2020     15:18                Scripts
d-----       11/05/2020     15:17                tcl
d-----       11/05/2020     15:17                Tools
-a----       15/10/2019     00:14          30188 LICENSE.txt
-a----       15/10/2019     00:14         711270 NEWS.txt
-a----       15/10/2019     00:12          99856 python.exe
-a----       15/10/2019     00:12         421888 python.pdb
-a----       15/10/2019     00:12          58896 python3.dll
-a----       15/10/2019     00:12        3748880 python37.dll
-a----       15/10/2019     00:12        9498624 python37.pdb
-a----       15/10/2019     00:12          98320 pythonw.exe
-a----       15/10/2019     00:12         421888 pythonw.pdb
-a----       14/10/2019     23:04          89752 vcruntime140.dll


PS C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64>

Hello sir, it looks like it’s an issue with a corrupted file or module from the NodeJS, maybe your antivirus is blocking it? or Windows Defender? really hard to know, you could try to turn both antivirus defenses off, just to try, but i think that could not be the problem, maybe windows does not install the NodeJS correctly, could be a problem in the registry files on windows.

You could try to delete the folders that “npm init” create on your project folder and run it again just to download a fresh new ones, hopefully with no errors this time.

C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\

If you have any doubt, please let us know so we can help you! :slight_smile:

Carlos Z.

Thanks Carlos for the continued support! You must be getting as sick of this issue as I am! :slight_smile:

I’ve tried again making doubly sure WindowsDefender is off as is my anti-virus. I tried deleting all files/subdirectory again in my ‘multisigproject’ folder. And re-ran “npm init” and then “npm install bcoin”. I have different errors now - please see below. Any final ideas for me to try? (if not I’ll abandon trying to resolve and instead try to install a Linux VM ).

PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help json` for definitive documentation on these fields
and exactly what they do.

Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
description:
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\package.json:

{
  "name": "multisigproject",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}


Is this OK? (yes)
PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject> npm install bcoin

> [email protected] install C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr
> node-gyp rebuild


C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\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.
  murmur3.c
  mrmr.c
  win_delay_load_hook.cc
     Creating library C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr\build
  \Release\mrmr.lib and object C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\m
  rmr\build\Release\mrmr.exp
  mrmr.vcxproj -> C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\mrmr\build\Rel
  ease\\mrmr.node

> [email protected] install C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1
> npm run rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."


> [email protected] rebuild C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1
> node-gyp rebuild


C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\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.
  addon.cc
  privatekey.cc
  publickey.cc
  signature.cc
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_converters_43_inl.h(22,1
): warning C4996: 'v8::Value::ToBoolean': was declared deprecated (compiling source file ..\src\addon.cc) [C:\Users\mar
ks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_converters_43_inl.h(40,1
): warning C4996: 'v8::Value::BooleanValue': was declared deprecated (compiling source file ..\src\addon.cc) [C:\Users\
marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(
103,37): error C2664: 'v8::MaybeLocal<v8::Function> v8::Function::New(v8::Local<v8::Context>,v8::FunctionCallback,v8::L
ocal<v8::Value>,int,v8::ConstructorBehavior,v8::SideEffectType)': cannot convert argument 1 from 'v8::Isolate *' to 'v8
::Local<v8::Context>' (compiling source file ..\src\addon.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg10
1\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(
105,32): message : No constructor could take the source type, or constructor overload resolution was ambiguous (compili
ng source file ..\src\addon.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules
\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\AppData\Local\node-gyp\Cache\12.16.3\include\node\v8.h(4275,31): message : see declaration of 'v8::Funct
ion::New' (compiling source file ..\src\addon.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigpr
oject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(
337,37): error C2660: 'v8::StringObject::New': function does not take 1 arguments (compiling source file ..\src\addon.c
c) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vc
xproj]
C:\Users\marks\AppData\Local\node-gyp\Cache\12.16.3\include\node\v8.h(5531,23): message : see declaration of 'v8::Strin
gObject::New' (compiling source file ..\src\addon.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multis
igproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(
337,60): error C2059: syntax error: ')' (compiling source file ..\src\addon.cc) [C:\Users\marks\Documents\IvanOnTechAca
demy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_converters_43_inl.h(22,1
): warning C4996: 'v8::Value::ToBoolean': was declared deprecated (compiling source file ..\src\publickey.cc) [C:\Users
\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_converters_43_inl.h(40,1
): warning C4996: 'v8::Value::BooleanValue': was declared deprecated (compiling source file ..\src\publickey.cc) [C:\Us
ers\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(
103,37): error C2664: 'v8::MaybeLocal<v8::Function> v8::Function::New(v8::Local<v8::Context>,v8::FunctionCallback,v8::L
ocal<v8::Value>,int,v8::ConstructorBehavior,v8::SideEffectType)': cannot convert argument 1 from 'v8::Isolate *' to 'v8
::Local<v8::Context>' (compiling source file ..\src\publickey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinPr
og101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(
105,32): message : No constructor could take the source type, or constructor overload resolution was ambiguous (compili
ng source file ..\src\publickey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_mod
ules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1034,1): error C2661:
'v8::Value::ToString': no overloaded function takes 0 arguments (compiling source file ..\src\addon.cc) [C:\Users\marks
\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\AppData\Local\node-gyp\Cache\12.16.3\include\node\v8.h(4275,31): message : see declaration of 'v8::Funct
ion::New' (compiling source file ..\src\publickey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multis
igproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1044,1): 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\addon.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigp
roject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1044,37): message : Ty
pes pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast (compiling sour
ce file ..\src\addon.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp25
6k1\build\secp256k1.vcxproj]
C:\Users\marks\AppData\Local\node-gyp\Cache\12.16.3\include\node\v8.h(2878,7): message : see declaration of 'v8::String
::WriteUtf8' (compiling source file ..\src\addon.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisi
gproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(
337,37): error C2660: 'v8::StringObject::New': function does not take 1 arguments (compiling source file ..\src\publick
ey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k
1.vcxproj]
C:\Users\marks\AppData\Local\node-gyp\Cache\12.16.3\include\node\v8.h(5531,23): message : see declaration of 'v8::Strin
gObject::New' (compiling source file ..\src\publickey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\mu
ltisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_converters_43_inl.h(22,1
): warning C4996: 'v8::Value::ToBoolean': was declared deprecated (compiling source file ..\src\privatekey.cc) [C:\User
s\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(
337,60): error C2059: syntax error: ')' (compiling source file ..\src\publickey.cc) [C:\Users\marks\Documents\IvanOnTec
hAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_converters_43_inl.h(40,1
): warning C4996: 'v8::Value::BooleanValue': was declared deprecated (compiling source file ..\src\privatekey.cc) [C:\U
sers\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1818,26): warning C499
6: 'v8::Object::Set': was declared deprecated (compiling source file ..\src\addon.cc) [C:\Users\marks\Documents\IvanOnT
echAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1824,26): warning C499
6: 'v8::Object::Set': was declared deprecated (compiling source file ..\src\addon.cc) [C:\Users\marks\Documents\IvanOnT
echAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_converters_43_inl.h(22,1
): warning C4996: 'v8::Value::ToBoolean': was declared deprecated (compiling source file ..\src\signature.cc) [C:\Users
\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1830,26): warning C499
6: 'v8::Object::Set': was declared deprecated (compiling source file ..\src\addon.cc) [C:\Users\marks\Documents\IvanOnT
echAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(
103,37): error C2664: 'v8::MaybeLocal<v8::Function> v8::Function::New(v8::Local<v8::Context>,v8::FunctionCallback,v8::L
ocal<v8::Value>,int,v8::ConstructorBehavior,v8::SideEffectType)': cannot convert argument 1 from 'v8::Isolate *' to 'v8
::Local<v8::Context>' (compiling source file ..\src\privatekey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinP
rog101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1836,30): warning C499
6: 'v8::Object::Get': was declared deprecated (compiling source file ..\src\addon.cc)C:\Users\marks\Documents\IvanOnTec
hAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(105,32): note: No constructor coul
d take the source type, or constructor overload resolution was ambiguous (compiling source file ..\src\privatekey.cc) [
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxpro
j]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_converters_43_inl.h(40,1
): warning C4996: 'v8::Value::BooleanValue': was declared deprecated (compiling source file ..\src\signature.cc) [C:\Us
ers\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1842,46): warning C499
6: 'v8::Object::Get': was declared deprecated (compiling source file ..\src\addon.cc) [C:\Users\marks\Documents\IvanOnT
echAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\AppData\Local\node-gyp\Cache\12.16.3\include\node\v8.h(4275,31): message : see declaration of 'v8::Funct
ion::New' (compiling source file ..\src\privatekey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multi
sigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1034,1): error C2661:
'v8::Value::ToString': no overloaded function takes 0 arguments (compiling source file ..\src\publickey.cc) [C:\Users\m
arks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1847,46): warning C499
6: 'v8::Object::Get': was declared deprecated (compiling source file ..\src\addon.cc) [C:\Users\marks\Documents\IvanOnT
echAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1044,1): 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\publickey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multi
sigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1044,37): message : Ty
pes pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast (compiling sour
ce file ..\src\publickey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\se
cp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(
103,37): error C2664: 'v8::MaybeLocal<v8::Function> v8::Function::New(v8::Local<v8::Context>,v8::FunctionCallback,v8::L
ocal<v8::Value>,int,v8::ConstructorBehavior,v8::SideEffectType)': cannot convert argument 1 from 'v8::Isolate *' to 'v8
::Local<v8::Context>' (compiling source file ..\src\signature.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinPr
og101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\AppData\Local\node-gyp\Cache\12.16.3\include\node\v8.h(2878,7): message : see declaration of 'v8::String
::WriteUtf8' (compiling source file ..\src\publickey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\mul
tisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(
105,32): message : No constructor could take the source type, or constructor overload resolution was ambiguous (compili
ng source file ..\src\signature.cc)C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modul
es\nan\nan_implementation_12_inl.h(337,37): error C2660: 'v8::StringObject::New': function does not take 1 arguments (c
ompiling source file ..\src\privatekey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\n
ode_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\AppData\Local\node-gyp\Cache\12.16.3\include\node\v8.h(5531,23): message : see declaration of 'v8::Strin
gObject::New' (compiling source file ..\src\privatekey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\m
ultisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\AppData\Local\node-gyp\Cache\12.16.3\include\node\v8.h(4275,31): message : see declaration of 'v8::Funct
ion::New' (compiling source file ..\src\signature.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multis
igproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(
337,60): error C2059: syntax error: ')' (compiling source file ..\src\privatekey.cc) [C:\Users\marks\Documents\IvanOnTe
chAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1818,26): warning C499
6: 'v8::Object::Set': was declared deprecated (compiling source file ..\src\publickey.cc) [C:\Users\marks\Documents\Iva
nOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1824,26): warning C499
6: 'v8::Object::Set': was declared deprecated (compiling source file ..\src\publickey.cc)C:\Users\marks\Documents\IvanO
nTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_object_wrap.h(24,1): error C2039: 'IsNearDeath': is no
t a member of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\marks\Documents\IvanOnTechAcad
emy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\addon.cc)
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1830,26): warning C499
6: 'v8::Object::Set': was declared deprecated (compiling source file ..\src\publickey.cc) [C:\Users\marks\Documents\Iva
nOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1859): message : see d
eclaration of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\marks\Documents\IvanOnTechAcad
emy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\addon.cc)
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1836,30): warning C499
6: 'v8::Object::Get': was declared deprecated (compiling source file ..\src\publickey.cc) [C:\Users\marks\Documents\Iva
nOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_object_wrap.h(67,17): wa
rning C4996: 'v8::PersistentBase<v8::Object>::MarkIndependent': was declared deprecated (compiling source file ..\src\a
ddon.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp25
6k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1842,46): warning C499
6: 'v8::Object::Get': was declared deprecated (compiling source file ..\src\publickey.cc) [C:\Users\marks\Documents\Iva
nOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_implementation_12_inl.h(
337,37): error C2660: 'v8::StringObject::New': function does not take 1 arguments (compiling source file ..\src\signatu
re.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k
1.vcxproj]
C:\Users\marks\AppData\Local\node-gyp\Cache\12.16.3\include\node\v8.h(5531,23): message : see declaration of 'v8::Strin
gObject::New' (compiling source file ..\src\signature.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\mu
ltisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1847,46): warning C499
6: 'v8::Object::Get': was declared deprecated (compiling source file ..\src\publickey.cc)C:\Users\marks\Documents\IvanO
nTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_object_wrap.h(124,1): error C2039: 'IsNearDeath': is n
ot a member of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\marks\Documents\IvanOnTechAca
demy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\addon.cc)
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1859): message : see d
eclaration of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\marks\Documents\IvanOnTechAcad
emy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\addon.cc)C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigpr
  oject\node_modules\nan\nan_implementation_12_inl.h(337,60): error C2059: syntax error: ')' (compiling source file ..\
  src\signature.cc)
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1034,1): error C2661:
'v8::Value::ToString': no overloaded function takes 0 arguments (compiling source file ..\src\privatekey.cc) [C:\Users\
marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1044,1): 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\privatekey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\mult
isigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1044,37): message : Ty
pes pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast (compiling sour
ce file ..\src\privatekey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\s
ecp256k1\build\secp256k1.vcxproj]
C:\Users\marks\AppData\Local\node-gyp\Cache\12.16.3\include\node\v8.h(2878,7): message : see declaration of 'v8::String
::WriteUtf8' (compiling source file ..\src\privatekey.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\mu
ltisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan_object_wrap.h(24,1): err
or C2039: 'IsNearDeath': is not a member of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\
marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\publickey.cc)C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multis
  igproject\node_modules\nan\nan.h(1034,1): error C2661: 'v8::Value::ToString': no overloaded function takes 0 argument
  s (compiling source file ..\src\signature.cc)
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1859): message : see d
eclaration of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\marks\Documents\IvanOnTechAcad
emy\BitcoinProg101\multisigproject\node_modules\secp256k1\build\secp256k1.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\publickey.cc)
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\nan\nan.h(1044,1): 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\signature.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multi
sigproject\node_modules\secp256k1\build\secp256k1.vcxproj]


Etc ,etc and then at the end of the error messages .....

C:\Users\marks\AppData\Local\node-gyp\Cache\12.16.3\include\node\v8.h(2709,40): message : see declaration of 'v8::Value
::Int32Value' (compiling source file ..\src\iterator.cc) [C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\mul
tisigproject\node_modules\leveldown\build\leveldown.vcxproj]
C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\src\iterator.cc(595,36
): error C2661: 'leveldown::Iterator::Iterator': no overloaded function takes 15 arguments [C:\Users\marks\Documents\Iv
anOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown\build\leveldown.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\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:310: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\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject\node_modules\leveldown
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\marks\AppData\Roaming\npm-cache\_logs\2020-05-12T23_13_19_461Z-debug.log
PS C:\Users\marks\Documents\IvanOnTechAcademy\BitcoinProg101\multisigproject>

Not sick of helping you, sick of windows for programming stuffs :laughing:.
It always have a lot of issues, so i really hate windows for programming.

I have research a little bit about your issue, and its not you only. One of the answers that i found is this one

So this is related to your windows machine not being able to compile native node modules and not to leveldown specifically. We don’t yet have a reliable way of producing windows binaries for each release, so for now you would have to build them yourself, which unfortunately is a huge pain right now for windows users :confused:

Here is another probably solution, but could not be the one:

Just had this issue and fixed it on Windows 10 by:

  1. Setting npm to use Python 2.7 instead of 3.5 with npm config set python python2.7
  2. Installing C++ part of Visual Studio 2015 Community – Settings>Add or Remove Programs>Modify VS2015 etc…

Still is better if you really try to do it on Linux, you will not find this kind of weird issues, since all this applications are build on Linux and then ported to Windows. Also in future courses you will have the same advantage if you learn them on Linux.

Please dont stop to ask for help, i know is frustrating (for both of us), but dont worry, it’s my job to give you a hand, no matter how difficult it looks like, i will and want to help you be able to finish all the courses.

Hope this gives you a clear view of the subject, keep learning! :slight_smile:

If you have any doubt, please let us know so we can help you!

Carlos Z.

Thanks Carlos.

I’ve now abandoned trying to resolve this under Windows. I managed to get a Linux virtual machine installed yesterday (on my Windows 10 laptop). As I want to also do other programming courses and generally skill up to hopefully be a professional developer in the blockchain space - I decided its best for me to invest some time into getting to grips with Linux.

I haven’t yet used my new Ubuntu VM for anything course-related - so I have a few questions:

  1. How do I proceed and set up the course-specific elements under Linux?
    Would my first step be to go back to the start of this course and install the bitcoin client on my Ubuntu VM? And then possible other elements I’ll need (e.g. nodeJS and bcoin library) before being able to do this section of the course?
  2. In general, for installing/configuring elements do I issue the same commands into Ubuntu terminal as outlined in the course (for Windows 10 users) e.g. ‘nm init’ and ‘nm install bcoin’?
  3. Any pointers that you can provide to get me restarted on the course a newly installed Ubunto environment would be much appreciated!

@Blockchain4MiAm - did you resolve the similar issues you were having under Windows10?
If not and are considering going down Linux (Ubuntu) Virtual machine route, then you may find this video tutorial for the install and initial config very useful. https://www.youtube.com/watch?v=5sa0acU4pmY And followed the video and then used the “VM Guide” that Carlos highlighted previously (i.e. the link to another student’s post who gives some further config pointers).

All the best,
Mark

1 Like

Linux is about freedom, most of the new tools in the blockchain space are built on linux, so you will find a lot of documentation to install most of the tools with easy steps.

If you want to take the path on linux, i advice you to learn about the OS commands, what can you do with the “root” user, how to do simple operations like copy or move a file to another folder with command lines, how to manage permissions level on some files.

If you learn linux before jumping into other courses in the academy, you will find yourself in a more easy journey than windows or mac. You could start with Ubuntu or Debian for example, and then start the adventure! :muscle:

To set up for an specific course, i would recommend to do the same has windows, create a folder and put all the files you need for that course into the folder.
To install NodeJs on ubuntu you need to do it by the command line (CLI).
You may need the curl application in order to download some packages out of the ubuntu repository, install it with this:

sudo apt-get update
sudo apt-get install curl

then you can follow the instructions here to install the NodeJS (really simple): NodeJS Installation instructions for Ubuntu.

Yes, the nodejs use the same commands on windows and ubuntu, so “npm init” or “npm install bcoin” also works the same on linux.

Any issue you find with linux i will be able to help you even better than windows, and you probably will find less issues than windows. Please dont doubt to write me anytime you have a doubt or an issue!

Hope this gives you a clear view of the subject, keep learning! :slight_smile:

If you have any doubt, please let us know so we can help you!

Carlos Z.

1 Like