hyperledger-labs / convector

Smart Contract Systems the easy way. Open source development framework.
Other
146 stars 45 forks source link

Document common issues for Linux users #30

Open walmon opened 5 years ago

walmon commented 5 years ago

From the Discord chat we have seen Linux users facing similar difficulties, we should update DOCs accordingly.

  1. Docker Compose

Docker doesn't include Compose by default: https://docs.docker.com/compose/install/

  1. Node Gyp rebuild

https://github.com/nodejs/node-gyp#on-unix

- > node-gyp rebuild

gyp ERR! build error 
gyp ERR! stack Error: not found: make
  1. Node Gyp permissions

https://github.com/worldsibu/hurley/issues/6

gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@worldsibu/hurley/node_modules/pkcs11js/.node-gyp'
  1. Script incompatibility: (thanks to @xcottos)
Hi all, it's not a convector issue but more an Ubuntu 18.04 one but I want to share it with you: there were some ppl receiving an error in Ubuntu 18.04 while invoking the cc:invoke script defined like that: "cc:invoke": "f() { chaincode-manager --config ./$2.$1.config.json --user $3 invoke $1 ${@:4}; }; f". The error was something like sh: 1: bad substitution. It's because by default linux uses sh (symlinked to dash in Ubuntu) for executing the npm scripts. For this reason if anyone asks for help on that the procedure is the following:
1) updating npm to a version >= 5
2) npm config set script-shell /bin/bash
this is general for all ppl having the issue, while for Ubuntu users if the command npm -v still shows the old version of npm (like 3.5.7) they have to:
3) sudo apt purge npm
4) ln -s /usr/local/bin/npm /usr/bin/npm
5) npm config set script-shell /bin/bash
it's because of bash caching the binaries links as documented here  https://askubuntu.com/questions/1036278/npm-is-incorrect-version-on-latest-ubuntu-18-04-installation
walmon commented 5 years ago

Another general tip

screen shot 2019-02-04 at 9 26 05 am