hyperledger / hyperledger/fabric-samples

Deploying Typescript Chaincodes Fail using DeployCC.sh In CLI Container for Test Network

Open
#591 3 comments 0 reactions 1 assignee Claimed by @AyushRaj8271 View on GitHub
Dominant language
Go
Stars
3k
Forks
3.5k
Avg merge
3d 20h
Merged PRs (30d)
6

Description

Using the deployCC.sh script (https://github.com/hyperledger/fabric-samples/blob/main/test-network/scripts/deployCC.sh) from the cli container errors out because npm is not installed. Simple fix - `apk add npm`.

This fails at:

https://github.com/hyperledger/fabric-samples/blob/main/test-network/scripts/deployCC.sh#L82

```
Compiling TypeScript code into JavaScript...
/opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode-ts /peer
./scripts/deployCC.sh: line 72: npm: command not found
./scripts/deployCC.sh: line 73: npm: command not found
/peer
Finished compiling TypeScript code into JavaScript
```

Without this the chaincode is deployed improperly and you can easily miss the error message because I believe it tries to package up an empty chaincode package. Another feature that would be useful if the compile fails, the script should halt and not try to continue to publish a bad chaincode package.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.