What to do when asset-transfer-basic/chaincode-javascript file can’t be located

When doing the deployment of smart contract in a channel, asset-transfer-basic file is need. But it if cannot be found in the fabric samples file where is should be, you can do these following steps

1. Type the following in the command line:
$ git status

2. Type:
$ git branch
$ git stash

You will get a result like this:

3. Type:
$ git checkout main

4. Look for “asset-transfer-basic” file. Type:
$ ls -la

5. Now that it is located, navigate to the needed directory. Type the following:
$ cd asset-transfer-basic/chaincode-javascript/
$ sudo nano package.json

6. Type the needed password, then type the following command:
$ sudo nano index.json
$ cd lib/
$ ls -la

7. Lastly, if you get the following result, type the command:
$ sudo nano assetTransfer.js

Now that you have the asset-transfer-basic located in fabric-samples file, you can proceed the deployment of smart contract in a channel.

Leave a Comment

Your email address will not be published. Required fields are marked *