Closed lucianoacsilva closed 5 years ago
Are you using Ubuntu 18.04?
Somebody from the community told us in the Discord chat that he faced something similar:
Quoting:
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
Walter Montes Delgado
Chief Executive Officer
+506 8879 8626
Blockchain in the Cloud. As easy as SaaS, as transparent as Bare Metal.
On Tue, 22 Jan 2019 at 11:12, lucianosilva44 notifications@github.com wrote:
Hello,
When i run npm run restart, it throws this error:
./node_modules/@worldsibu/convector-tool-dev-env/scripts/init.sh: 12: ./node_modules/@worldsibu/convector-tool-dev-env/scripts/init.sh: Syntax error: "(" unexpected
I take out the "(" (for all the functions in init.sh); however, when I try to restart the network again, I face this:
./node_modules/@worldsibu/convector-tool-dev-env/scripts/init.sh: 12: ./node_modules/@worldsibu/convector-tool-dev-env/scripts/init.sh: function: not found ./node_modules/@worldsibu/convector-tool-dev-env/scripts/init.sh: 13: ./node_modules/@worldsibu/convector-tool-dev-env/scripts/init.sh: Bad substitution
Could you guys help me with this, please?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/worldsibu/convector-example-marketplace/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AFCcrKu9fuPviTbF69AOKFNUzcnMpt8Qks5vF0ZlgaJpZM4aNIJ5 .
This is a really old example tho.
You may find this more recent:
Hello,
When i run npm run restart, it throws this error:
./node_modules/@worldsibu/convector-tool-dev-env/scripts/init.sh: 12: ./node_modules/@worldsibu/convector-tool-dev-env/scripts/init.sh: Syntax error: "(" unexpected
I take out the "(" (for all the functions in init.sh); however, when I try to restart the network again, I face this:
./node_modules/@worldsibu/convector-tool-dev-env/scripts/init.sh: 12: ./node_modules/@worldsibu/convector-tool-dev-env/scripts/init.sh: function: not found ./node_modules/@worldsibu/convector-tool-dev-env/scripts/init.sh: 13: ./node_modules/@worldsibu/convector-tool-dev-env/scripts/init.sh: Bad substitution
Could you guys help me with this, please?