Author

Topic: Need help with compiling Bitcoin source code got from github (Read 168 times)

legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
tried everything but no luck till...   Huh I  put the folder in C:\Wallet-master and open the CMD in folder and tried to execute the following given code "npm run apply:bitcoincom" and still the result is : 'npm' is not recognized as an internal or external command,
operable program or batch file. this...

Actually i simply want to build the source and run the App on all platforms like IOS, ANDROID and WEB..

According to your screenshot it seems like you've installed nodejs correctly, so I guess you need to add the path to node to your environment variables:

You need to Add C:\Program Files\nodejs to your PATH environment variable. To do this follow these steps:

    1. Use the global Search Charm to search "Environment Variables"
    2. Click "Edit system environment variables"
    3. Click "Environment Variables" in the dialog.
    4. In the "System Variables" box, search for Path and edit it to include C:\Program Files\nodejs. Make sure it is separated from any other paths by a ;.

You will have to restart any currently-opened command prompts before it will take effect.

Unless you want to use Bitcoin Cash I'd also recommend considering other wallets such as Electrum as an alternative. There's a wide variety of wallets to choose from:

https://bitcoin.org/en/choose-your-wallet

All of which are open source and can be build by yourself, pretty much all of which follow well-defined Bitcoin wallet standards that allow interoperability across different wallet apps making sure you're not locked in one specific wallet app forever.
newbie
Activity: 4
Merit: 0
tried everything but no luck till...   Huh I  put the folder in C:\Wallet-master and open the CMD in folder and tried to execute the following given code "npm run apply:bitcoincom" and still the result is : 'npm' is not recognized as an internal or external command,
operable program or batch file. this...

Actually i simply want to build the source and run the App on all platforms like IOS, ANDROID and WEB..
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
Here is the Image and my whole Dilemma is explained. it will help you to understand better.

please have a look.

"Wallet-master" is the folder containing the source files you downloaded from GitHub, correct? You can place this folder wherever you like -- well, actually you managed to put it in one of the worst locations imaginable so I recommend you to place it somewhere else Smiley (eg. C:/Wallet-master/ or into your Documents folder).


After you have moved the "Wallet-master" folder to a convenient location (preferably not within the nodejs Program Files folder),

1) enter the folder (it should contain all the files you see on the github page including a file called "package.json"),

2) open a commandline window inside the folder (eg. Right Click + Shift and then selecting "Open Command Line Window here"),

3) enter the command "npm run apply:bitcoincom" (ie. the whole line as described on the GitHub page -- not just the "apply:bitcoincom" part). Once you've done this you need to

4) open the JavaScript file "index.js" inside the folder node_modules > asn1.js-rfc5280 with a text editor. There at the top you should see some code that looks something like " try { ... } catch(e) { ... } " -- that's the bit that according to the readme you need to delete and replace with " var asn1 = require('asn1.js'); ".

5) Follow the remaining instructions of the GitHub page from there and you should be fine.


What are you trying to do anyway? Anything specific or do you simply want to avoid using precompiled binaries?
newbie
Activity: 4
Merit: 0
https://drive.google.com/file/d/1gbmemjWdQUtqxBqWZOoSJSxu-2hw9S03/view?usp=sharing

Here is the Image and my whole Dilemma is explained. it will help you to understand better.

please have a look.
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
Actually i have installed nodejs but i m getting confused that in which directory i have to open CMD on desktop or in APP folder because whenever i open CMD in APP folder and run
"npm run apply:bitcoincom" its getting error every time and same on desktop . am i missing something?

You have to run the command from the folder where you saved the source files, ie. the folder that contains the "package.json" file. This will then create a folder called "node_modules" where you have to edit one of the JavaScript files as described by the readme ( node_modules/asn1.js-rfc5280/index.js ).

If you ten still don't get it to run please post the error message, otherwise we won't be able to help you.
newbie
Activity: 4
Merit: 0
Actually i have installed nodejs but i m getting confused that in which directory i have to open CMD on desktop or in APP folder because whenever i open CMD in APP folder and run
"npm run apply:bitcoincom" its getting error every time and same on desktop . am i missing something?
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
If you don't have nodejs installed yet, get it by running:
Code:
sudo apt-get install npm

Then follow the readme.

Alternatively, if you're on Windows or MacOS, you can download Node.js from here:

https://nodejs.org/en/download/

After which you can run the wallet from the commandline interface according to the instructions on the github page.
legendary
Activity: 1624
Merit: 2481
The build process is explained in the readme.
The first step is:

Code:
npm run apply:bitcoincom

If you don't have nodejs installed yet, get it by running:
Code:
sudo apt-get install npm

Then follow the readme.
newbie
Activity: 4
Merit: 0
i m trying to compile the bitcoin wallet for WEB, ANDROID and IOS but confused where to start which tools and software to use (newbie) can anyone guide me from where to start
Help will be appreciated.
Project is : https://github.com/Bitcoin-com/Wallet

Thanx..
Jump to: